By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,654 Members | 1,575 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,654 IT Pros & Developers. It's quick & easy.

Add click event to a control that does not have one

P: n/a
Is that possible? The control in question is the ErrorProvider.

Lennart
Jul 20 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi Lennart,

just declare a new class MyErrorProvider, which inherits
from ErrorProvider.
Then you can define additional events.

After compiling the MyErrorProvider will appear in the toolbox.

Regards
Bernd

Public Class MyErrorProvider
Inherits ErrorProvider
End Class
Jul 21 '07 #2

P: n/a
Hi Bernd,

Yes I know that I will have to do this; it is however creating or capturing
the click event I have trouble with.

If you have an example or can guide me towards a source, I'd be grateful.

Lennart

"Bernd Schend" <be**********@gmx.dewrote in message
news:eN**************@TK2MSFTNGP06.phx.gbl...
Hi Lennart,

just declare a new class MyErrorProvider, which inherits
from ErrorProvider.
Then you can define additional events.

After compiling the MyErrorProvider will appear in the toolbox.

Regards
Bernd

Public Class MyErrorProvider
Inherits ErrorProvider
End Class

Jul 23 '07 #3

P: n/a
Lennart Nielsen wrote:
Is that possible? The control in question is the ErrorProvider.
If the base control really doesn't support "Click" then you'll have to
subclass (inherit from) it, override the WndProc method and catch the
individual Windows-level Message(s) associated with clicking.

HTH,
Phill W.
Jul 24 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.