ATOUTFOX
COMMUNAUTÉ FRANCOPHONE DES PROFESSIONNELS FOXPRO
Visual FoxPro : le développement durable

Forum AtoutFox : Re: Affichage localisation via google map   

Sujet

rss Flux RSS des derniers messages

Vous devez vous identifier pour pouvoir poser une question ou répondre.

mer. 23 décembre 2020, 10h39

Hamidou
Maroc Maroc

atoutfox.public.association

Re: Affichage localisation via google map

voila la correction de ta procédures VFP
--------------------------------------------------------
* Localisation
LCurl = "https://maps.google.com/maps?q=122-route-des-Puthods,01340,CRAS-SUR-REYSSOUZE,FRANCE";;

ShowMap(m.LCurl)

*****
Procedure ShowMap(tcUrl)
Public oForm
oForm = Createobject('form1')
oForm.Show()
Declare ShellExecute In shell32.Dll Integer, String, String, String, String, Integer
* Laisser windows de decider, quelle browser il va appler (le browser par defaukt)
ShellExecute( 0 , [open] , LCurl , [] , [] , 1 )
* undeclare API-function
Clear Dlls [ShellExecute]
* release form
oForm.RELEASE()
Endproc
*****FIN
Function GetHTML
Local myVar
TEXT to myVar noshow
ENDTEXT
Return myVar
Endfunc

Define Class HTMLViewer As OleControl
OleClass = 'Shell.Explorer'

Procedure Refresh
Nodefault
Endproc

Procedure LoadHTML(tcHTML)
With This
.Navigate2("about:blank")
.Document.Write(m.tcHTML)
Endwith
Enddefine

Define Class form1 As Form
Height = 600
Width = 800
Caption = "HTML sample"

Add Object HTMLViewer As HTMLViewer With ;
Top = 10, ;
Left = 10, ;
Height = 580, ;
Width = 780, ;
Anchor = 15,;
Visible = .T., ;
Name = "HTMLViewer"

Procedure Init
Lparameters tcHTML
If !Empty(m.tcHTML)
With Thisform.HTMLViewer
.LoadHTML(m.tcHTML)
Endwith
Endif
Endproc

Procedure HTMLViewer.NavigateError
Lparameters pdisp, url, frame, statuscode, Cancel
Set Step On
Cancel = .T.
Endproc

Procedure HTMLViewer.BeforeNavigate2
Lparameters pdisp, url, Flags, targetframename, postdata, headers, Cancel
Cancel = .T. && prevents actual navigation
Endproc

Procedure HTMLViewer.Refresh
Nodefault
Endproc
Enddefine



Permalink : http://www.atoutfox.org/nntp.asp?ID=0000019768
20 088 messages dans le forum • Liste complète des messages

Publicité

Les pubs en cours :

www.atoutfox.org - Site de la Communauté Francophone des Professionnels FoxPro - v3.4.0 - © 2004-2024.
Cette page est générée par un composant COM+ développé en Visual FoxPro 9.0-SP2-HF3