473,419 Members | 2,056 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

open a new browser window in Windows Forms

VR
Hi,

How can I open a web site in a new browser window from a
regular windows form? (not an ASP.NET)

Do I have to use a COM ActiveX control or is there
anything like that already built in in .NET?

Thanks,
VR
Nov 15 '05 #1
5 60656
I ran across that problem awhile back and the microsoft knowledge base
didn't exactly help me:
http://support.microsoft.com/default...b;EN-US;305703

They suggest:

System.Diagnostics.Process.Start("http://www.google.com/index.html");

But that doesn't work for me (some kindof registry problem I guess).
This does work:
System.Diagnostics.Process.Start("z:\index.html");

So my computer knows what to do with .html files, there's something
about it being on a drive vs. http that is screwing it up.

This will open a web page in a new window of internet explorer, as
long as IE is installed on the client.:
System.Diagnostics.Process proc = new
System.Diagnostics.Process();
proc.StartInfo.FileName = "iexplore";
proc.StartInfo.Arguments = "http://www.google.com/";
proc.Start();

I guess you can use either or both, depending upon what you expect the
client machines to look like.

HTH,
mike
"VR" <Vi****************@gat.com> wrote in message
news:07****************************@phx.gbl...
Hi,

How can I open a web site in a new browser window from a
regular windows form? (not an ASP.NET)

Do I have to use a COM ActiveX control or is there
anything like that already built in in .NET?

Thanks,
VR

Nov 15 '05 #2

Hi,

You can add the Microsoft Internet Control 1.1 reference to your
application, then you can use it like this:

SHDocVw.InternetExplorerClass ie=new SHDocVw.InternetExplorerClass ();
Object vHeaders = null;
Object vPost = null;
Object vTarget = null;
Object vFlags = null;
ie.Navigate("http://www.google.com",ref vFlags,ref vTarget,ref vPost,ref
vHeaders);
ie.Visible =true;

Hope this helps.

Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "VR" <Vi****************@gat.com>
| Sender: "VR" <Vi****************@gat.com>
| Subject: open a new browser window in Windows Forms
| Date: Wed, 6 Aug 2003 22:49:02 -0700
| Lines: 10
| Message-ID: <07****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNcp5rf0BZ5eyx/RSa8lDKB5Azu0g==
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:174768
| NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hi,
|
| How can I open a web site in a new browser window from a
| regular windows form? (not an ASP.NET)
|
| Do I have to use a COM ActiveX control or is there
| anything like that already built in in .NET?
|
| Thanks,
| VR
|

Nov 15 '05 #3

Hi,

For more information, you can visit:
http://support.microsoft.com/default...;en-us;Q305703

Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "VR" <Vi****************@gat.com>
| Sender: "VR" <Vi****************@gat.com>
| Subject: open a new browser window in Windows Forms
| Date: Wed, 6 Aug 2003 22:49:02 -0700
| Lines: 10
| Message-ID: <07****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNcp5rf0BZ5eyx/RSa8lDKB5Azu0g==
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:174768
| NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hi,
|
| How can I open a web site in a new browser window from a
| regular windows form? (not an ASP.NET)
|
| Do I have to use a COM ActiveX control or is there
| anything like that already built in in .NET?
|
| Thanks,
| VR
|

Nov 15 '05 #4
VR
Thanks, Dmitriy.

-----Original Message-----
I ran across that problem awhile back and the microsoft knowledge basedidn't exactly help me:
http://support.microsoft.com/default.aspx?scid=kb;EN- US;305703
They suggest:

System.Diagnostics.Process.Start ("http://www.google.com/index.html");
But that doesn't work for me (some kindof registry problem I guess).This does work:
System.Diagnostics.Process.Start ("z:\index.html");
So my computer knows what to do with .html files, there's somethingabout it being on a drive vs. http that is screwing it up.

This will open a web page in a new window of internet explorer, aslong as IE is installed on the client.:
System.Diagnostics.Process proc = new
System.Diagnostics.Process();
proc.StartInfo.FileName = "iexplore";
proc.StartInfo.Arguments = "http://www.google.com/"; proc.Start();

I guess you can use either or both, depending upon what you expect theclient machines to look like.

HTH,
mike
"VR" <Vi****************@gat.com> wrote in message
news:07****************************@phx.gbl...
Hi,

How can I open a web site in a new browser window from a
regular windows form? (not an ASP.NET)

Do I have to use a COM ActiveX control or is there
anything like that already built in in .NET?

Thanks,
VR

.

Nov 15 '05 #5
VR
Thanks, Jeffrey.
-----Original Message-----

Hi,

For more information, you can visit:
http://support.microsoft.com/default.aspx?scid=kb;en- us;Q305703
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| Content-Class: urn:content-classes:message
| From: "VR" <Vi****************@gat.com>
| Sender: "VR" <Vi****************@gat.com>
| Subject: open a new browser window in Windows Forms
| Date: Wed, 6 Aug 2003 22:49:02 -0700
| Lines: 10
| Message-ID: <07****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNcp5rf0BZ5eyx/RSa8lDKB5Azu0g==
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:174768| NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hi,
|
| How can I open a web site in a new browser window from a| regular windows form? (not an ASP.NET)
|
| Do I have to use a COM ActiveX control or is there
| anything like that already built in in .NET?
|
| Thanks,
| VR
|

.

Nov 15 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Simon Wigzell | last post by:
Is there any way to create and open a window in javascript so that links in other websites won't "steal" it? I've written a web page with a form for people to enter headlines and URLs from...
13
by: Dave Holmes | last post by:
Is there a way to keep an other application from opening a link in a browser where I am running an ASP application? For example, I have an ASP application open in a browser. If I click on a link...
33
by: randau | last post by:
Linking to a Targeted Browser Window I'd like to open reference links to other web sites in a separate browser window from the browser window hosting my own web site pages. The Link Target...
6
by: Ayende Rahien | last post by:
Excetremely annoying problem, I've an application with a long startup time. So I created another form with my logo in it to as a splash screen. The splash screen is run from another thread and is...
1
by: vba man | last post by:
I've used the following code to open a browser window and read the data to a file. I know there is another way using a query, but that doesn't work for this application. What I'd like to be able...
2
by: Pink | last post by:
Hi I am a Newbie to .Net can anyone let me know the diffrence between Windows.Forms and Winforms they are different version of totally different and are some methods different too Thanks
1
by: jokolee | last post by:
I'm using web browser to view web page in vb form......I wanna read how much <div> is in the page ( it should be 3), but can't work it.....In javascript it's gonna be something like this..........
19
by: catmansa | last post by:
Is there anyway to determine the present pixel height & width size of a open browser window? :)
3
Logan1337
by: Logan1337 | last post by:
Hi. I know about System.Diagnostics.Process.Start( url ) to launch a url in the default web browser, but I'm wondering if it's possible to actually get a path to the actual executable that is set as...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.