On CBS.com: Behind the scenes: Big Brother

Quickly change colors with VB6's Color Palette

Tags: Microsoft development tools, PRODUCTIVITY, Peter Aitken, Microsoft Visual Basic 6.0, Color Palette, square, Visual Basic Tips Newsletter

  • Save
  • Print
  • Digg This
  • 6

Takeaway: Developers grow accustomed to using certain tools in their toolbox, often forgetting about other useful features that at their disposal. See what you can do with one of these little-used tools: Visual Basic 6's Color Palette.

Advance your scripting skills to the next level with TechRepublic's free Visual Basic newsletter, delivered each Friday. Automatically sign up today!

A little-used tool in the Visual Basic 6 design environment is the Color Palette. This tool lets you quickly assign colors to forms and also to define custom colors.

To use the Color Palette, first select a form in the designer. Then select View | Color Palette to display the palette. It displays a grid of about 60 squares. Most of these squares contain a predefined color; the others are white. Clicking a square assigns that color as the form's background color. It's fast and easy to try different colors to see what they look like. Click the Default button to return the form to the default medium gray.

To define a custom color, click one of the white squares in the palette and then click the Define Colors button. Another dialog box opens in which you can define your custom color. When you have defined a color, click Add Color to return to the Color Palette and add the color to the square. You can now apply this new color (or any of the other colors) to a form.

  • Save
  • Print
  • Digg This
  • 6

Print/View all Posts Comments on this article

Thank you!gago@...  | 04/22/05
What about palette switching?john.foggitt@...  | 04/25/05

What do you think?

Article Categories

Security
Security Solutions, IT Locksmith
Networking and Communications
E-mail Administration NetNote, Cisco Routers and Switches
CIO and IT Management
Project Management, CIO Issues, Strategies that Scale
Desktops, Laptops & OS
Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
Data Management
Oracle, SQL Server
Servers
Windows NT, Linux NetNote, Windows Server 2003
Career Development
Geek Trivia
Software/Web Development
Web Development Zone, Visual Basic, .NET

Cracking Open Apple Tech

advertisement
Click Here