VB : Change Url of an activated browser within VB 
Author Message
 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  
 VB : Change Url of an activated browser within VB


Fri, 19 Jun 1992 00:00:00 GMT  
 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  
 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  
 VB : Change Url of an activated browser within VB


Fri, 19 Jun 1992 00:00:00 GMT  
 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  
 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,


- Show quoted text -

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  
 
 [ 7 post ] 

 Relevant Pages 

1. Starting Internet browser with url from within VB

2. Changing Printer Setup within the browser with VB Script

3. How can I change URL address of Browser if there are many browsers in the screen

4. change printer from within a VB module within Access 2000

5. Launch URL within browser window using TargetFrameName?

6. Launch URL within browser window using TargetFrameName?

7. Launch URL within browser window using TargetFrameName?

8. Can I Activate Browser Print Button from VB?

9. Sending URL to Open Browser in VB

10. Sending url to web browser via VB

11. Opening a web browser at a specific url with vb

12. changing the url dynamically within beforeNavigate

 

 
Powered by phpBB® Forum Software