Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The missing mouse pointer
Message
From
10/03/2006 18:19:43
 
 
To
10/03/2006 17:55:52
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:
01103315
Views:
14
>Thanks David, but I am already using mouspointer = 2. It's only abou 3/8 of an inch./ I want a line from the top of the screen to the bottom and one from one side to the other, intersecting where the mouse click would occur.
>
>>Grady,
>>
>>
>>thisform.imgMap.MousePointer = 2
>>
>>
>>>Thank you folks. I scanned the map and it is in an image container.

Add a container with 2 line objects to it. Make the BackStyle of the Container transparent, and be sure to send the 2 lines to the back.

In the Init of Line1 (Horizontal):
this.Left = 0
this.Width = this.Parent.Width
this.Height = 0
In the Init of Line2 (Vertical):
this.Top = 0
this.Height = this.Parent.Height
this.Width = 0
In the Container.MouseMove:
LPARAMETERS nButton, nShift, nXCoord, nYCoord
this.Line1.Top = nYCoord - this.Top
this.Line2.Left = nXCoord - this.Left
[Update]

And to compensate for when the mouse actually moves along the line itself:
Line1.MouseMove:
LPARAMETERS nButton, nShift, nXCoord, nYCoord
this.Top = nYCoord - this.Parent.Top
this.Parent.Line2.Left = nXCoord - this.Parent.Left
Line2.MouseMove:
LPARAMETERS nButton, nShift, nXCoord, nYCoord
this.Left = nXCoord - this.Parent.Left
this.Parent.Line1.Top = nYCoord - this.Parent.Top
And to handle when the mouse moves outside the container (Container.MouseLeave):
LPARAMETERS nButton, nShift, nXCoord, nYCoord
this.Line1.Top = nYCoord - this.Top
this.Line2.Left = nXCoord - this.Left
That should do it.

[Another Update]
And if you don't like the mouse pointer being visible in the container, you can add this to the Container.Init:
this.MousePointer = 13
this.SetAll("MousePointer",13)
or
this.MousePointer = 2
this.SetAll("MousePointer",2)
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform