Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Aug 7, 1997

Color My World-In Default!

Just before performing your final 'make EXE,' switch your desktop color scheme and see just how many backgrounds you have hard-coded! (Sadly, several excellent shareware controls fail here, VBPJ contributors are guilty of this, and even the VB4 help file examples slip up!)

Try the desert desktop scheme in Win95 as a starting point, or, better still, create a new ugly scheme just to test all your control colors.

VB4 provides 24 system colors though a set of constants (search help for Color Constants or VBTranslateColor) for use in your code, many of which are used as a default for VB controls, but if you've changed the property setting with the VB palette, you must retype (or paste) the hexadecimal number shown next to the color into the property text box, substituting the 0x for &H. Alternatively, you could click on another control that already has the correct color value, copy the property value, and paste it into your control. Then you won't be so gray.

Technical Reviewer's Note: In VB4, there is a new Color Palette View Window with a DEFAULT button. Select each Form or Control one at a time, select the DEFAULT button and the control will be set to the Windows Default. Be aware that the Appearance property should be set to 3-D for best results.

Clint Walker
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date