Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dot on a map
Message
De
27/12/2016 17:35:30
 
 
À
27/12/2016 15:58:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01646132
Message ID:
01646136
Vues:
90
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform