Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opening each url in separately default web browser
Message
From
26/11/2006 03:21:10
Reza Meamar
Homa Programming Group
Shiraz, Iran
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01172447
Message ID:
01172451
Views:
21
Dear Sergey,
I change my code as below.
DECLARE INTEGER ShellExecute IN shell32; 
    INTEGER hwnd,; 
    STRING  lpOperation,; 
    STRING  lpFile,; 
    STRING  lpParameters,;   
    STRING  lpDirectory,; 
    INTEGER nShowCmd 


   SELECT M_Web
   GO TOP
   SCAN ALL FOR !EMPTY(WFav)
      
      lcUrl = "http://www."+ALLTRIM(WWeb)+"/"
      IF ShellExecute(0, "Open", lcUrl, "", "", 1) <= 32
         * Error
      ENDIF
   ENDSCAN
But yet when I run it,
1- if I select 4 url as my favorites from 10 url, only last record ( or Url ) opened. But I want to my favorite urls opened in 4 browser window separately.
2- if I have an open browser window, when I run my code, my url opened in active browser window and not in new browser window.



>Try SHELLEXECUTE instead. See Re: RUN command botching up SET PATH commands... Message #1169622 for details.
...
>lcUrl = "http://microsoft.com"
>IF ShellExecute(0, "Open", lcUrl, "", "", 1) <= 32
>  * Error
>ENDIF
>
>
>>I have a program that users can select some website as themselves favorites.
>>I have a form that in it i have a command button as "FAVORITES".
>>When user click it, i want to open selected website in separately default web browser.
>>I am using from below code. But this opens all url in one browser window, and only last selected url.
>>What is the best way for doing this?
>>Thanks
>>
>>
>>   MyObject = CREATEOBJECT("Shell.Application")
>>   SELECT M_Web
>>   GO TOP
>>   SCAN ALL FOR !EMPTY(WFav)
>>        MyObject.Open("http://www."+ALLTRIM(WWeb)+"/")
>>   ENDSCAN
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform