Windows Develop Bookmark and Share   
 index > Windows Forms General > How to set normal link to visited on WebBrowser control?
 

How to set normal link to visited on WebBrowser control?

Hi!
How to set normal link to visited on WebBrowser control?
Thanks.
izekia  Wednesday, December 19, 2007 7:31 AM

Hi izekia,

What did you mean by “set normal link to visit on WebBrowser control?�Did you mean visit web pages using WebBrowser? If so, please check the following sample:

Code Snippet

NEWDGV

public partial class Form11 : Form

{

public Form11()

{

InitializeComponent();

}

private void Form11_Load(object sender, EventArgs e)

{

this.textBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend;

this.textBox1.AutoCompleteSource = AutoCompleteSource.AllUrl;

this.textBox1.Text = "http://www.microsoft.com";

}

private void btnGo_Click(object sender, EventArgs e)

{

this.webBrowser1.Navigate(this.textBox1.Text);

}

}

To run the above sample, you need to place a TextBox, a Button and a WebBrowser on the Form.

Hope this helps.
Best regards.
Rong-Chun Zhang

Rong-Chun Zhang  Friday, December 21, 2007 10:20 AM

Hi izekia,

What did you mean by “set normal link to visit on WebBrowser control?�Did you mean visit web pages using WebBrowser? If so, please check the following sample:

Code Snippet

NEWDGV

public partial class Form11 : Form

{

public Form11()

{

InitializeComponent();

}

private void Form11_Load(object sender, EventArgs e)

{

this.textBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend;

this.textBox1.AutoCompleteSource = AutoCompleteSource.AllUrl;

this.textBox1.Text = "http://www.microsoft.com";

}

private void btnGo_Click(object sender, EventArgs e)

{

this.webBrowser1.Navigate(this.textBox1.Text);

}

}

To run the above sample, you need to place a TextBox, a Button and a WebBrowser on the Form.

Hope this helps.
Best regards.
Rong-Chun Zhang

Rong-Chun Zhang  Friday, December 21, 2007 10:20 AM
sorry for my english.
I mean following:
When I receive OnNavigating event from WebBrowser I set OnNavigatingEA.Cancel = true so navigating link stay in "not visited" state, how i can change state of this link(url) as visited?
izekia  Friday, December 21, 2007 2:21 PM
sorry, its already sets link as visited
izekia  Sunday, December 23, 2007 7:34 PM

You can use google to search for other answers

Custom Search

More Threads

• Why does Control.DoDragDrop swallow exceptions?
• when and how paint event works?
• ListView text truncated in List mode when columns collection not empty?
• Program 'PATH_&_NAME.exe' does not have an entry point defined
• How can I get a user-selected region of a picture?
• masking datagridview cell
• HTTP Post and XML document from a windows application
• change 1st collection item in statusstrip from StatusLabel to ProgressBar
• Upload ActiveX (DLL) on runtime and use it
• Multi-language input validation