Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing mouse pointer on mouse down???
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01409969
Message ID:
01409971
Vues:
67
>I have a shape on my form with the following settings:
>
>MousePointer = 99 - Custom
>MouseIcon = g:\mywork\openhand.cur
>
>When I run the form and pass the pointer over the shape it changes to the open hand.
>
>I then added code in the shape methods:
>
>
MouseDown
>LPARAMETERS nButton, nShift, nXCoord, nYCoord
>This.Mouseicon = "g:\j5web\movehand.cur"
>
>MouseUp
>LPARAMETERS nButton, nShift, nXCoord, nYCoord
>This.Mouseicon = "g:\j5web\openhand.cur"
>
>I thought this would cause the open hand to change to the closed hand on the mouse click but it does not change. Where did I go wrong?
>Thanks

OK,
found a fix. The icon was changing but was not visible till the mouse was moved. I added code to mouse down and up and it works great now. The Mouse At ... simply moves the mouse to the current position (ie no move at all) but somewhere deep in the bowels of VFP some elf thinks he has to refresh the cursor.
MouseDown
LPARAMETERS nButton, nShift, nXCoord, nYCoord
Local mName
mName = thisform.name
This.Mouseicon = "g:\j5web\movehand.cur"
Mouse At Mrow(), Mcol() Window &mName

MouseUp
LPARAMETERS nButton, nShift, nXCoord, nYCoord
Local mName
mName = thisform.name
This.Mouseicon = "g:\j5web\openhand.cur"
Mouse At Mrow(), Mcol() Window &mName
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform