Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The missing mouse pointer
Message
From
10/03/2006 16:37:40
 
 
To
10/03/2006 09:10:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01103072
Message ID:
01103273
Views:
11
>I have a form with a map on it. I want to create an animated mouse pointer. The pointer would be crosshairs from each edge of the form to the other and from top to bottom, much like the cursor used for drafting programs. Can this be done in VFP or will the redrawing of the lines as the cursor moves erase the map underneath? If it can be done, how?


Add 2 lines to Form: linHor, linVert

Image1.MousePointer = 13

Image1.MouseMove:

LPARAMETERS nButton, nShift, nXCoord, nYCoord

THISFORM.linHor.TOP = nYCoord
THISFORM.linVert.LEFT = nXCoord

linVert.Init:

THIS.TOP = THISFORM.image1.TOP
THIS.LEFT = THISFORM.image1.LEFT + THISFORM.image1.WIDTH/2
THIS.HEIGHT = THISFORM.image1.HEIGHT

linHor.Init:

THIS.TOP = THISFORM.image1.TOP + THISFORM.image1.HEIGHT/2
THIS.LEFT = THISFORM.image1.LEFT
THIS.WIDTH = THISFORM.image1.WIDTH

linVert.MouseMove:

LPARAMETERS nButton, nShift, nXCoord, nYCoord
THISFORM.linhor.TOP = nYCoord
THISFORM.linvert.LEFT = nXCoord

linHor.MouseMove:

LPARAMETERS nButton, nShift, nXCoord, nYCoord
THISFORM.linhor.TOP = nYCoord
THISFORM.linvert.LEFT = nXCoord

linHort.MousePointer = 13
linVert.MousePointer = 13

This is quick and dirty, just to give you the idea. Tidy up/make class/or use as is

Carlos
Previous
Reply
Map
View

Click here to load this message in the networking platform