Wrox Programmer Forums
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 6th, 2004, 07:53 AM
Authorized User
 
Join Date: Jul 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sachin-csharp Send a message via Yahoo to sachin-csharp
Default Internet Explorer from VC#.NET

Hi,

Now, I am designing a form in VC#.NET.
This form contains a button "Visit our Web Site".
Let me know that while click on this button how to open an Internet Explorer with a specified name of the site from C# code.

Reply me,

Regards,
Sachin.



Sachin R. Patil
Pune,
India
__________________
Sachin R. Patil
Pune,
India
 
Old September 7th, 2004, 04:25 PM
Registered User
 
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi!

Try out this code below. I use 2 functions. Create a linklabel, do doubleclick on it and in the code-section of studio use this samplecode:

don´t forget also to include this using-directives:

"using System.Diagnostics;"

----------------------------------------------------------------

        private void linkLabelWebsite_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.BrowseToWebsite(((LinkLabel)sender).Text);
        }

        private void BrowseToWebsite(string url)
        {
            ProcessStartInfo startInfo = new ProcessStartInfo("IExplore.exe");
            startInfo.WindowStyle = ProcessWindowStyle.Normal;
            startInfo.Arguments = url;

            Process.Start(startInfo);
        }

----------------------------------------------------------------

I don`t explain the code because it is so simple.

Best regards,

mrfreeze

 
Old September 8th, 2004, 12:12 AM
Authorized User
 
Join Date: Jul 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sachin-csharp Send a message via Yahoo to sachin-csharp
Default

Hi mrfreeze,

Thanks a lot.
This code works properly. And It is very helpful for me.

ok,
Bye,
Sachin.



Sachin R. Patil
Pune,
India





Similar Threads
Thread Thread Starter Forum Replies Last Post
automation of internet explorer khan091 C# 2 July 5th, 2007 05:54 PM
Internet Explorer cannot open the internet site cathiec ASP.NET 2.0 Basics 1 October 22nd, 2005 01:30 PM
Internet Explorer JelfMaria VB How-To 10 April 27th, 2005 03:58 PM
add icon in InterNet Explorer in C# or Vb.net nashnash ASP.NET 1.0 and 1.1 Professional 3 October 4th, 2004 12:56 AM
Internet Explorer from VC#.NET code sachin-csharp C# 2005 1 September 18th, 2004 01:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.