Jump to content
Xtreme .Net Talk

Recommended Posts

  • Leaders
Posted

hi i've decided it's time to dabble in C# :-\ i'm just working on adding some events to a form with a textbox and a webbrowser.

so far i managed to figure out how to add this event...

this.textBox1.Click += new System.EventHandler(this.textBox1_Click);
// at the design area
	private void textBox1_Click(object sender, System.EventArgs e)
	{
	    MessageBox.Show(Application.ProductName,"test");
	}

but i'm trying to add an event for Document complete on the browser and it wont allow it.

this.wb.DocumentComplete += new System.EventHandler(this.wb_DocumentComplete);
/// gets highlighted as not correct ^^^
	private void wb_DocumentComplete(object sender,System.EventArgs e)
	{
//
	}

any advice on this would be appreciated ty.

 

:)

  • Leaders
Posted

that one's ok , i think this will work as it dont error now...

this.wb.DocumentComplete += new AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEventHandler(this.wb_DocumentComplete);
//

	private void wb_DocumentComplete(object sender,AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent e)
	{
//
	}

but any advice on when to use System.EventArgs and when to use events that are specific to the item would be appreciated ty.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...