Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Performance question on GDI+ classes
Message
De
11/06/2010 17:42:13
 
 
À
11/06/2010 07:06:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01468355
Message ID:
01468609
Vues:
157
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform