Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Performance question on GDI+ classes
Message
From
11/06/2010 17:42:13
 
 
To
11/06/2010 07:06:57
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01468355
Message ID:
01468609
Views:
166
>>I am currently trying out Bernard’s shiny glass VFP buttons which utilize these classes. The form that will contain these buttons will also contain a background picture under the buttons. If I render these buttons using the default render mode of zero (memory BMP), then the surrounding areas of the button which accommodate the shadow show up and cover the background image. So, I changed the surrounding colors to be .Color.Transparent and tried render modes of 4 and 5 (memory/file PNG). This got the transparency to work perfectly, however the performance of the buttons as they get rendered (i.e. a new Draw() during MouseEnter and MouseLeave) is extremely slow.
>>
>>Would anyone have any ideas as to how to get my performance back? The only thing I could think of right now is to save multiple PNGs to represent the button’s different states (default, hovered, and clicked) and just those for the events on a standard image control. However, I'd prefer just using the controls as designed with better performance.
>>
>>Any assistance would be greatly appreciated.
>
>
>Hi Jon,
>
>You may try to tweak the ImageCanvas class, the parent class of the buttons.
>I guess that the buttons are being drawn twice.
>
>Hope that helps
>
>Cesar

Hi John, could you send me an example of this class or at least the link where to find it :)
thanks
Alessio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform