Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing an image in run-time. How to add to the project
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00603624
Message ID:
00604097
Vues:
24
Amazing how simple the best solutions are!
merci Gérald
Eric

>>I am trying to do a visual object that will be a generic mult-stage button:
>>
>>The "button" is in fact an image that changes when mouse goes over it and when the user click on it.
>>So I do a this.picture = image_?.jpg in mousedown, mouseup, mouseleave and mousenenter events.
>>It works find but I don't want the program to get the image on disk. I want it in memory like it does for the disablepicture property of a button. These pictures are automatically added to the project when you use them. Can we do the same ? Can we add a property to an object to keep these picture and that will add automatically the image to the project ?
>>
>>Thanks for any help
>>Eric
>
>Create 4 images holder.
>4 images control with the correct picture loaded.
>Place them out of view on your form and refere to the .picture property of the one you want:
>this.picture=thisform.holderMouseDown.picture
>this.picture=thisform.holderMouseUp.picture
>this.picture=thisform.holderMouseLeave.picture
>this.picture=thisform.holderMouseEnter.picture
>
>HTH
Eric Crespin
Consultant
PC PLUS Software Inc.
www.pcplus.ca
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform