Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / October 2004

Tip: Looking for answers? Try searching our database.

How to open a new web browser from a windows form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Todd McCarty - 12 Aug 2004 02:04 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
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.