Form events in inherited controls

  • Thread starter Thread starter Eduard Meusburger
  • Start date Start date
E

Eduard Meusburger

How can I access, register to a event which is fired in my
WinForm class from a inherited textbox.
I want to register to the event in my inherited textbox
class.
Is this possible?

Thanks
 
Eduard,

Do you want to subscribe to the textbox's events and handle them in a form,
or do you want to handle parent form's events in the inherited textbox?
 
Hello Dmitriy

Thank you for your respond.

I want to handle the parent form's events in the inherited
textbox.

Eduard

-----Original Message-----
Eduard,

Do you want to subscribe to the textbox's events and handle them in a form,
or do you want to handle parent form's events in the inherited textbox?

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

How can I access, register to a event which is fired in my
WinForm class from a inherited textbox.
I want to register to the event in my inherited textbox
class.
Is this possible?

Thanks

.
 
Eduard,

A control has the ParentForm property returning a form that owns the
control. You can obtain a reference to a parent form from this property and
subscribe to the form's events the usual way.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Edaurd Meusburger said:
Hello Dmitriy

Thank you for your respond.

I want to handle the parent form's events in the inherited
textbox.

Eduard

-----Original Message-----
Eduard,

Do you want to subscribe to the textbox's events and handle them in a form,
or do you want to handle parent form's events in the inherited textbox?

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

How can I access, register to a event which is fired in my
WinForm class from a inherited textbox.
I want to register to the event in my inherited textbox
class.
Is this possible?

Thanks

.
 
Back
Top