473,503 Members | 10,322 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 60662
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
2369
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
1838
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
4024
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
2526
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
1775
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
1565
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
1454
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
2106
by: catmansa | last post by:
Is there anyway to determine the present pixel height & width size of a open browser window? :)
3
1515
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
7095
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
7294
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7361
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5602
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
4693
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...
0
1523
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
749
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
403
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.