Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dot on a map
Message
From
27/12/2016 17:35:30
 
 
To
27/12/2016 15:58:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01646132
Message ID:
01646136
Views:
89
>Hi kids. I am looking for a code snippet that will put a dot on a map when I click the mouse on the map image.
>
>All the next in 2017
>
>Grady

A VFP all around GDI+less solution:
LOCAL TestForm AS Form

m.TestForm = CREATEOBJECT("Form")

m.TestForm.AddObject("Map", "MapImage")

m.TestForm.Map.Picture = GETPICT()
m.TestForm.Map.Top = (m.TestForm.Height - m.TestForm.Map.Height) / 2
m.TestForm.Map.Left = (m.TestForm.Width - m.TestForm.Map.Width) / 2
m.TestForm.Map.Visible = .T.
m.TestForm.Show(1)

m.TestForm = .NULL.

DEFINE CLASS MapImage AS Image

	FUNCTION MouseDown
	LPARAMETERS Button, Shift, XCoord, YCoord
	
		Thisform.PSet(m.XCoord, m.YCoord)
	
	ENDFUNC

ENDDEFINE
----------------------------------
António Tavares Lopes
Previous
Reply
Map
View

Click here to load this message in the networking platform