Open Web Browser from Winform
-
In Winform, I would like to put a linkedlabel, by click it, it will show up IE web browser, ( Browser will totally seperate from Windform, not within a winform control), how can I do it?
-
this should help you : VB:
using System.Diagnostics;
//^^^^ top of your form's code pagePrivate void button1\_Click(Object sender, System.EventArgs e) { Process processToStart =new Process(); processToStart.StartInfo.FileName="IEXPLORE.exe"; processToStart.StartInfo.Arguments="http://google.com"; processToStart.Start();// Open internet explorer And navigate To google.com }
:) hope it helps
Private void ExpectingTwins(string twins)
{
switch(twins)
{
Case ("twins on the way"):
MessageBox.Show("for mr and mrs dynamic","twins on the way");
break;
}
}
-
In Winform, I would like to put a linkedlabel, by click it, it will show up IE web browser, ( Browser will totally seperate from Windform, not within a winform control), how can I do it?
use combination of Process and ProcessInfo class and call method start :-D;)
-
In Winform, I would like to put a linkedlabel, by click it, it will show up IE web browser, ( Browser will totally seperate from Windform, not within a winform control), how can I do it?
This should do the trick. (I think I originally picked up this from MSDN or something):
private void linkLabel1_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) { // Determine which link was clicked within the LinkLabel. linkLabel1.Links[linkLabel1.Links.IndexOf(e.Link)].Visited = true; // Display the appropriate link based on the value of the LinkData property of the Link object. System.Diagnostics.Process.Start(e.Link.LinkData.ToString()); }