Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add events to usercontrols

Status
Not open for further replies.

dymadarlin

Programmer
Jun 26, 2003
41
0
0
CA
Hi there,

I have a text box in a user control, let's call it textbox1

That user control is used in a form, let's call it usercontrol1

I have a form in the project, and I have used usercontrol1 in this form. I want the form to change when the text in textbox1 is changed.

How can I make an event in Usercontrol so that I can use it in my win form.

Thanks.

 
does it inherit from something??

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Does what inherid from something? :) the form or usercontrol?
 
the usercontrol of course

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Ah, yes it inherits

System.Windows.Forms.UserControl
 
You declare in your UserControl:

Public Event SomeEvent()

Someplace(s) in your UserControl, you code:

RaiseEvent SomeEvent()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top