VB : Change Url of an activated browser within VB
Author |
Message |
BDARI #1 / 7
|
 VB : Change Url of an activated browser within VB
Hi I do perform a successfull launch of a browser with an url as argument with shellexecute..but i dont know how to send a new url argument. I guess that knowing the handle value, i can send a message to the browser. Do i have something special to do , create an object or a class (i am not experienced at all ) or run another shell with a special parm to avoid the creation of a new browser ? I perform a search in dejanews & msdn . Yur help would be appreciated Than'k for your reply ! GB
|
Sat, 09 Mar 2002 03:00:00 GMT |
|
 |
#2 / 7
|
 VB : Change Url of an activated browser within VB
|
Fri, 19 Jun 1992 00:00:00 GMT |
|
 |
Todd #3 / 7
|
 VB : Change Url of an activated browser within VB
HI this code will send email or open a webpage using the users default email client or default browser. To send a new URL, change the code for the URL or Mailto address to a variable and get the string from that. You can populate the variable as you need. Private Declare Function ShellExecute Lib "shell32.dll" _ Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation _ As String, ByVal lpFile As String, ByVal lpParameters As String, _ ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long 'on a click this will launch the default email app.
vbNullString, vbNullString, vbNormalFocus) 'on a click this will launch the default broswer Call ShellExecute(0&, vbNullString, "http://www.AgendumSoftware.com", _ vbNullString, vbNullString, vbNormalFocus) -- Sincerely, Todd B - Agendum Software
AgActiveSuite now available! YOU choose what products you want included!
Quote: > Hi > I do perform a successfull launch of a browser with an url as argument > with shellexecute..but > i dont know how to send a new url argument. I guess that knowing the > handle value, i can send a message to the browser. Do i have something > special to do , create an object or a class (i am not experienced at > all ) or run another shell with a special parm to avoid the creation of > a new browser ? > I perform a search in dejanews & msdn . Yur help would be appreciated > Than'k for your reply ! > GB
|
Sat, 09 Mar 2002 03:00:00 GMT |
|
 |
BDARI #4 / 7
|
 VB : Change Url of an activated browser within VB
Hi Thx for yur reply...but those instructions doesnt work within my configuration. i use the following code BrowserExec = Space(255) FileName = "C:\temphtm.HTM" FileNumber = FreeFile ' Get unused file number Open FileName For Output As #FileNumber ' Create temp HTML file Write #FileNumber, "<HTML> <\HTML>" ' Output text Close #FileNumber ' Close file RetVal = FindExecutable(FileName, Dummy, BrowserExec) BrowserExec = Trim(BrowserExec) If RetVal <= 32 Or IsEmpty(BrowserExec) Then MsgBox "Could not find associated Browser", vbExclamation, "Browser Not Found" Else RetVal = ShellExecute(me.hwnd, "open", BrowserExec, url, Dummy, SW_NORMAL) endif and the way yu tell me doesnt launch any browser even if i force MSIE at default browser. the shellexecute launch a new browser window...i dont want that ! thanks anyway Best regards GB Todd B a crit : Quote: > HI this code will send email or open a webpage using the users default email > client or default browser. To send a new URL, change the code for the URL > or Mailto address to a variable and get the string from that. You can > populate the variable as you need. > Private Declare Function ShellExecute Lib "shell32.dll" _ > Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation _ > As String, ByVal lpFile As String, ByVal lpParameters As String, _ > ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long > 'on a click this will launch the default email app.
> vbNullString, vbNullString, vbNormalFocus) > 'on a click this will launch the default broswer > Call ShellExecute(0&, vbNullString, "http://www.AgendumSoftware.com", _ > vbNullString, vbNullString, vbNormalFocus) > -- > Sincerely, > Todd B - Agendum Software
> AgActiveSuite now available! YOU choose what products you want included!
> > Hi > > I do perform a successfull launch of a browser with an url as argument > > with shellexecute..but > > i dont know how to send a new url argument. I guess that knowing the > > handle value, i can send a message to the browser. Do i have something > > special to do , create an object or a class (i am not experienced at > > all ) or run another shell with a special parm to avoid the creation of > > a new browser ? > > I perform a search in dejanews & msdn . Yur help would be appreciated > > Than'k for your reply ! > > GB
|
Sun, 10 Mar 2002 03:00:00 GMT |
|
 |
#5 / 7
|
 VB : Change Url of an activated browser within VB
|
Fri, 19 Jun 1992 00:00:00 GMT |
|
 |
BDARI #6 / 7
|
 VB : Change Url of an activated browser within VB
Hi Coders I find the out the solution after 2 days ! using DDE NSshell works perfectly ! so the logical procedure is look for an opened browser - i check for a window named "NetscapeSlaveWindow" Select case Handle case 0 launch browser with shellexecute case else linktopic "NSshell|WWW_OpenURL" linkexecuteurl end case That's all GeeBee ICQ 53401711 Meta for a future quest ( it's a test to see if dejanews find this msg ) <Netscape - vb - Visual Basic - open - launch - change - send - argument - url - dde - browser shell - shellexecute > BDARIA a crit : Quote: > Hi > Thx for yur reply...but those instructions doesnt work within my configuration. > i use the following code > BrowserExec = Space(255) > FileName = "C:\temphtm.HTM" > FileNumber = FreeFile ' Get unused file number > Open FileName For Output As #FileNumber ' Create temp HTML file > Write #FileNumber, "<HTML> <\HTML>" ' Output text > Close #FileNumber ' Close file > RetVal = FindExecutable(FileName, Dummy, BrowserExec) > BrowserExec = Trim(BrowserExec) > If RetVal <= 32 Or IsEmpty(BrowserExec) Then > MsgBox "Could not find associated Browser", vbExclamation, "Browser Not > Found" > Else > RetVal = ShellExecute(me.hwnd, "open", BrowserExec, url, Dummy, SW_NORMAL) > endif > and the way yu tell me doesnt launch any browser even if i force MSIE at default > browser. > the shellexecute launch a new browser window...i dont want that ! > thanks anyway > Best regards > GB > Todd B a crit : > > HI this code will send email or open a webpage using the users default email > > client or default browser. To send a new URL, change the code for the URL > > or Mailto address to a variable and get the string from that. You can > > populate the variable as you need. > > Private Declare Function ShellExecute Lib "shell32.dll" _ > > Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation _ > > As String, ByVal lpFile As String, ByVal lpParameters As String, _ > > ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long > > 'on a click this will launch the default email app.
> > vbNullString, vbNullString, vbNormalFocus) > > 'on a click this will launch the default broswer > > Call ShellExecute(0&, vbNullString, "http://www.AgendumSoftware.com", _ > > vbNullString, vbNullString, vbNormalFocus) > > -- > > Sincerely, > > Todd B - Agendum Software
> > AgActiveSuite now available! YOU choose what products you want included!
> > > Hi > > > I do perform a successfull launch of a browser with an url as argument > > > with shellexecute..but > > > i dont know how to send a new url argument. I guess that knowing the > > > handle value, i can send a message to the browser. Do i have something > > > special to do , create an object or a class (i am not experienced at > > > all ) or run another shell with a special parm to avoid the creation of > > > a new browser ? > > > I perform a search in dejanews & msdn . Yur help would be appreciated > > > Than'k for your reply ! > > > GB
|
Sun, 10 Mar 2002 03:00:00 GMT |
|
 |
Todd #7 / 7
|
 VB : Change Url of an activated browser within VB
Ahh, Nice solution. I like that. -- Sincerely, Todd B - Agendum Software
AgActiveSuite now available! YOU choose what products you want included!
Quote: > Hi Coders > I find the out the solution after 2 days ! using DDE NSshell works perfectly ! > so the logical procedure is > look for an opened browser - i check for a window named
"NetscapeSlaveWindow" Quote: > Select case Handle > case 0 > launch browser with shellexecute > case else > linktopic "NSshell|WWW_OpenURL" > linkexecuteurl > end case > That's all > GeeBee > ICQ 53401711 > Meta for a future quest ( it's a test to see if dejanews find this msg ) > <Netscape - vb - visual basic - open - launch - change - send - argument - url - dde > - browser > shell - shellexecute > > BDARIA a crit : > > Hi > > Thx for yur reply...but those instructions doesnt work within my configuration. > > i use the following code > > BrowserExec = Space(255) > > FileName = "C:\temphtm.HTM" > > FileNumber = FreeFile ' Get unused file number > > Open FileName For Output As #FileNumber ' Create temp HTML file > > Write #FileNumber, "<HTML> <\HTML>" ' Output text > > Close #FileNumber ' Close file > > RetVal = FindExecutable(FileName, Dummy, BrowserExec) > > BrowserExec = Trim(BrowserExec) > > If RetVal <= 32 Or IsEmpty(BrowserExec) Then > > MsgBox "Could not find associated Browser", vbExclamation, "Browser Not > > Found" > > Else > > RetVal = ShellExecute(me.hwnd, "open", BrowserExec, url, Dummy, SW_NORMAL) > > endif > > and the way yu tell me doesnt launch any browser even if i force MSIE at default > > browser. > > the shellexecute launch a new browser window...i dont want that ! > > thanks anyway > > Best regards > > GB > > Todd B a crit : > > > HI this code will send email or open a webpage using the users default email > > > client or default browser. To send a new URL, change the code for the URL > > > or Mailto address to a variable and get the string from that. You can > > > populate the variable as you need. > > > Private Declare Function ShellExecute Lib "shell32.dll" _ > > > Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation _ > > > As String, ByVal lpFile As String, ByVal lpParameters As String, _ > > > ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long > > > 'on a click this will launch the default email app. > > > Call ShellExecute(0&, vbNullString,
Quote: > > > vbNullString, vbNullString, vbNormalFocus) > > > 'on a click this will launch the default broswer > > > Call ShellExecute(0&, vbNullString, "http://www.AgendumSoftware.com", _ > > > vbNullString, vbNullString, vbNormalFocus) > > > -- > > > Sincerely, > > > Todd B - Agendum Software
> > > AgActiveSuite now available! YOU choose what products you want included!
> > > > Hi > > > > I do perform a successfull launch of a browser with an url as argument > > > > with shellexecute..but > > > > i dont know how to send a new url argument. I guess that knowing the > > > > handle value, i can send a message to the browser. Do i have something > > > > special to do , create an object or a class (i am not experienced at > > > > all ) or run another shell with a special parm to avoid the creation of > > > > a new browser ? > > > > I perform a search in dejanews & msdn . Yur help would be appreciated > > > > Than'k for your reply ! > > > > GB
|
Sun, 10 Mar 2002 03:00:00 GMT |
|
|
|