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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB classic graphics 1

Ken01

Programmer
Aug 8, 2014
68
GB
What is the purpose of masks in VB6 graphics and how easy is it to create them ?
 
Were VB6 to have masks, then the purpose would be the same as in any graphics environment - a technique to conceal or alter parts of an image for aesthetic purposes, to remove unwanted sections, or to reshape it. It includes two types: bitmasking, which hides pixels based on their color values, and alpha masking, which conceals pixels based on their opacity.

VBs various built-in graphics primitives do not include any sort of masking. The image control, however, does; it supports bitmasking, and allows you to define which colour in an image will be transparent. But that's about all the control you have.

This isn't to say you can't do more complex bitmasking or alpha masking in VB - but to do so you have to work with GDI or GDI+ APIs (GDI doesn't support alpha masking at all). Some of the GDI+ API is encapsulated in the Windows Image Acquisition library, but to use the rest you need a tool library (which I believe I have previously pointed you to) as VB6 cannot work with GDI+ directly
 

Part and Inventory Search

Sponsor

Back
Top