I am trying to open a new web browser from a menu on a windows form. Can
anyone point me to a reference on how to do this? I am using C#, but any
example will work.
thanks in advance
Shell - 12 Aug 2004 05:13 GMT
Todd,
If you just want to start a browser, put this line of code in the event
handler for the menu:
System.Diagnostics.Process.Start("iexplore.exe");
(assuming you want to start IE).
If you'd like to browse to a specific URL with the default browser,
simply use the URL instead of "iexplore.exe".
Hope that helps.
angus - 12 Aug 2004 06:43 GMT
response.write("<script>window.open('xxx')</script>")
> I am trying to open a new web browser from a menu on a windows form. Can
> anyone point me to a reference on how to do this? I am using C#, but any
> example will work.
>
> thanks in advance
Shell - 12 Aug 2004 07:16 GMT
> response.write("<script>window.open('xxx')</script>")
Lol... how do you plan on making that run from a *menu* on a *Windows
Forms* application? :)
JohnLiu - 12 Aug 2004 08:40 GMT
> I am trying to open a new web browser from a menu on a windows form. Can
> anyone point me to a reference on how to do this? I am using C#, but any
> example will work.
>
> thanks in advance
System.Diagnostics.Process.Start("http://www.google.com");
I remember you need to make sure your application is STA, but that's default on C#.
jliu - www.ssw.com.au - johnliu.net
Shiva - 13 Aug 2004 07:38 GMT
Process.Start ("iexplore");
If you want to open a site/page by default, Process.Start
(http://www.microsoft.com);
I am trying to open a new web browser from a menu on a windows form. Can
anyone point me to a reference on how to do this? I am using C#, but any
example will work.
thanks in advance
anubisfm - 09 Oct 2004 18:13 GMT
How would I go about calling this as a child window?
> Process.Start ("iexplore");
>
[quoted text clipped - 6 lines]
>
> thanks in advance
Rakesh Rajan - 10 Oct 2004 10:53 GMT
Hi,
If you want to create a form which would have a browser within it, then use
the Microsoft Web Browser control. Right click on the toolbar, click on COM
and select the control.
HTH,
Rakesh Rajan
> How would I go about calling this as a child window?
>
[quoted text clipped - 8 lines]
> >
> > thanks in advance