Quantcast
Viewing all articles
Browse latest Browse all 27055

VS 2008 Events from usercontrol

Hello,
I'm trying to make simple but functional usercontrol with only one textbox inside.
Here are few main events which depends on situation in usercontrol which I declared like this:

Code:

Shadows Event Click(ByVal sender As Object, ByVal e As System.EventArgs)
Or "Public Event..." if I need some custom event.

And in poropriate moment I raises event like this
Code:

RaiseEvent Click(sender, e)
what work's as expected and I can handle it in main program.

But I noted that my usercontrol dont raises "generic events".
For example I try to handle "_LostFocus" of my usercontrol and see that it is not triggered at all since I'm not declare it inside UC.
But this event is listed in events list in IDE together with other common properties.

Question is:
Do I need to declare and raise every single event which I intend to use inside a usercontrol code or here is a way to use generic events by default like "_LostFocus, _Validating, _Enter, _FontChanged" etc, so they can be triggered automatically.
I think in VB6 this was called "mapping events" (not sure).

Any help will be appreciated.

Viewing all articles
Browse latest Browse all 27055

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>