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

Using icon files as picture sources

Status
Not open for further replies.

chpicker

Programmer
Apr 10, 2001
1,316
Whenever I use an icon file as the picture source of a control, whether it be a command button, an image control, or what have you, the icon colors don't quite work right, and there are 6 colored dots in the lower left corner. For example, if I use the W95MBX01.ico file (Red circle with a white X in the center) that comes with Visual Studio, the background comes up white. If I turn the background transparent, the white X goes transparent with the background. And, again, there are the 6 colored dots. Is this normal? Is there any way around this? How can I use an .ico file as a picture source without anomalies?
 
Hi!

Make an msk file with the same name as the ico file. In msk file make areas that are transparent black and areas to be displayed white (or vis versa? I don't remember exactly). VFP uses msk file to show transparent parts of the image.

Hope this helps.
Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
For a more detailed explanation of what Vlad eluded to, refer to Chapter 10 - Using Controls of the VFP Programmer's guide, specifically the section labeled "Enhancing Control Display", subsection "Using Picture Masks". Jon Hawkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top