Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Microsoft Toolbar & Imagelist Problem
Message
From
02/07/1999 11:38:45
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00236802
Message ID:
00236945
Views:
10
>
>Hi Leo,
>
>In addition to what BOb has told you, let me suggest a workaround that may prove very beneficial.
>
>One problem you might run into using the ImageList and Toolbar ActiveX controls is that you may find that your forms take long to load. Consider the following: If you have defined Hot, Cool and Disabled ImageLists for your toolbar and you have ten buttons on it, you have to call LoadPicture 30 times to populate the ImageLists. Each call to LoadPicture requires that each of the individual bitmaps be evaluated. Each bitmap contains information regarding itself so that it can be properly displayed. So you got all that overhead, and this doesn't include the file i/o that occurs or the space that the bitmaps take on the drive.
>
>One of the least mentioned or used (IMHO) but useful, in these situations, ActiveX controls is the Picture Clip control. What it allows you to do is specify a single bitmap, containing all the images required. This means that instead of having 30 (as mentioned in my example) bitmaps, there's only the additional control and one bitmap. Further, the bitmap doesn't have to be supplied separately in an application.
>
>FWIW, the biggest drawback to using the control is creating the bitmap. Since each must be exactly the same size, and precisely located within the larger bitmap. This is because the Picture Clip allows you to specify the number of rows and columns in the bitmap and, via its GraphicCell collection, allows the bitmaps to be retrieved via a single sub-script (GraphicCell(1), for example).
>
>The second biggest drawback is adding additional bitmaps to the one containing all the references. However, inspite of this, I still feel that the additional effort is far outweighed by its benefits.


Thanks for the help. Where would I get the Picture Clip control? I have VS6 Professional but I installed all VFP options and ActiveX components only.

Leo St-Jacques
Leo St-Jacques
Solis Productions
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform