Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MsxBox text colors?

Status
Not open for further replies.

DantanaSwat

IS-IT--Management
Dec 3, 2003
29
US
Is it possible to change the text color in message boxes? If so...how :)
 
No you can't change the color of the text if you are using the MsgBox function.

The alternative is to roll your own message box form using a VB6 COM object. This would have a selection of buttons and Icons to choose from and one or more labels with appropriate properties. There are a number of such COM objects around, usually with source. For example I use a simple form object that I wrote which has a variable number of entry fields each with its own label etc.
 
For scripts that are interactive via the Windows GUI this is one reason why I tend to write them as HTAs, hosted in IE instead of in WSH. There you have all of DHTML to work with, along with CSS for fine control over the appearance of dialogs of various sorts.

They can't always do everything that a WSH script can do, but they handle a very large percentage of scripts. Some information can be found at:


Another possibility is to use IE as an automation object from a WSH script as a flexible dialog tool for WSH scripts. Some people really like that option though I personally find it clunky and avoid it - but it's another tool in the scripter's toolkit. See:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top