General information
Category:
Coding, syntax & commands
Environment versions
Network:
Windows 2000 Server
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only