Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I open a web site from VFP
Message
From
02/02/2017 12:55:14
 
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
01647340
Message ID:
01647363
Views:
62
>>>>>>>At the end of my program I want to access my web site
>>>>>>>
>>>>>>>www.colin-northway.com
>>>>>>>
>>>>>>>I can remember how to do it
>>>>>>
>>>>>>https://www.berezniker.com/content/pages/visual-foxpro/opening-url-default-web-browser
>>>>>
>>>>>
>>>>>Sorry Naomi
>>>>>
>>>>>But if I put that line of code in my program I get an error - I want to open my website from a program - what is the correct code?
>>>>>
>>>>>Thanks
>>>>>
>>>>>Colin
>>>>
>
>
>>>>What error are you getting and what exactly did you put in your program?
>>>
>>>
>>>Exactly what you gave me - I would have changed Sergeys website for mine had it worked I got unrecognised command verb
>>
>>Did you try something like the following?
>>
lcURL = "www.colin-northway.com"
>>oShell = Createobject("wscript.shell")
>>oShell.Run(lcUrl)
>>
>>or
>>
>>
#DEFINE SW_SHOWNORMAL 1
>>DECLARE Long ShellExecute IN "Shell32.dll" ;
>>	Long hwnd, String lpVerb, String lpFile, ;
>>	String lpParameters, String lpDirectory, Long nShowCmd
>>lcURL = "www.colin-northway.com"
>>ShellExecute(0, "Open", lcUrl, "", "", SW_SHOWNORMAL)
>
>
>That works fine thanks is there any way I can get the cursor to highlight on "Thinking hard about Customer Loyalty - if you see my site its the 4th line down on the left
>
>Thanks for all your help

Have you tried changing the line:
lcURL = "www.colin-northway.com"
to something like
lcURL = "www.colin-northway.co.uk/thinking-hard-about-customer-loyalty/"
(BTW, if you're curious to how I figured this one out -- when browsing your page, I hovered the mouse over the link you mentioned, and there's a little notification that shows me the URL. Another trick is to right-click the link in question then select "Copy shortcut", then you should get the URL for the page retrieved when you click on it)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform