And forgive me if I misunderstand your request, but your English is far
better than my Spanish!

So, you have a VFP form and textbox and the user can enter a STREET address
or a WEB address?

* Launch ANY default browser with the desired address
if ("http") = LEFT(textbox.value,4) && ASSuME web
  theaddress = Chrtran(Alltrim(cAddress)
ELSE  && Assume a street address. Use your Google Maps url above
  theaddress = "http://maps.google.com/maps?q="+Chrtran(Alltrim(cAddress),"
","+"
ENDIF

ShellExecute(theaddress)

You can find many examples of how to invoke ShellExecute in the ProFox
archives, the Fox Wiki, or even the Samples app that comes with VFP + the
Foundation Classes.



On Wed, Jul 30, 2014 at 4:27 PM, Rafael Copquin <[email protected]>
wrote:

> Perhaps I did not explain myself correctly.
>
> I have this form that uses the Microsoft Web Browser control.
> I assign the address I want to show thus:
>
> Local cAddress
>
> cAddress = Alltrim(thisform.text1.Value)  && in this textbox the user
> enters the STREET ADDRESS
>
> thisform.oWeb.navigate( "http://maps.google.com/maps?q=
> "+Chrtran(Alltrim(cAddress)," ","+")) && oWeb is the name I gave to the
> object
>
> It will show the map inside the form. But this is only on Google Chrome
> (which I have in my machine) and it will show the street address correctly
> However if the user enters a URL (i.e. www.microsoft.com) it will still
> show a map, it will not go to the web page, but will show a dialog asking
> whether you want to see the web page. When you click on the link it will
> show the page but immediately a series of dialogs saying that there a
> script errors in the page appears and the whole thing gets screwed up
> (excuse my Spanish please)
>
> I also have FireFox and Internet Explorer (Windows 7 Ultimate), but the
> code I've got to launch the map is no good for those two browsers
>
> I need:
>
>  * A way for VFP to identify which is the default browser for the
>    particular machine
>  * The code that will launch the map in FireFox or Internet Explorer
>  * The code that will go to the URL (show the web page)
>
>
>
> El 30/07/2014 17:01, Stephen Russell escribió:
>
>> On Wed, Jul 30, 2014 at 2:29 PM, Rafael Copquin <[email protected]
>> >
>> wrote:
>>
>>  Hi Stephen
>>>
>>> I know that!
>>>
>>> But I need a reliable code for each the most common (Chrome, IE,FireFox)
>>>
>>> Where can I get the necessary info?
>>> ------------------
>>>
>>>
>> How about:
>>
>> http://maps.google.com/?q=60 Industrial Park, Oakland, NT, 38160
>> <http://maps.google.com/?q=1200%20Pennsylvania%20Ave%20SE,%20Washington,%
>> 20District%20of%20Columbia,%2020003>
>>
>>
>>
>>
>>
>>
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
>  text/plain (text body -- kept)
>  text/html
> ---
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/cacw6n4ujth5qqg2ew5dwwyhybztsq2ydk9wic3zugsa66ky...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to