Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting mouse position?
Message
De
18/09/2011 09:07:35
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01523849
Message ID:
01523858
Vues:
37
>Hi,
>
>How would you recommend to detect a current mouse position on the VFP application screen? What happens is a user clicks and a function from the www.news2news.com (wonderful tools) helps me to catch that the mouse was clicked. But I need to find it if it was clicked within a certain area. TIA.

Here is some code I use to put a dot on a map where a crime is located. It may help.
* In the CLICK method of a form
* XX and YY are the coordiates of the mouse position

Local Choice
Choice = Messagebox( "Do you want to place a crime location on the map? ",4," Map coordinates ")
Do Case
Case Choice = 7
	Return
Case Choice = 6
	NameOfShape = SYS(2015)
	Thisform.AddObject( NameOfShape, "shape")
	With Thisform.Controls[thisform.ControlCount] && the last member
		.Move(XX,YY,7,7)
		.Curvature = 99
		.BackColor = 255
		.BackStyle = 1
		.BorderWidth = 0
		.BorderColor = 65535
		.SpecialEffect = 0
		.ToolTipText = "Crime location"
		.Visible = .T.
	Endwith
ENDCASE
Do Form Details
I ain't skeert of nuttin eh?
Yikes! What was that?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform