all groups > vb.net controls > may 2007 >
You're in the

vb.net controls

group:

UserControl inherit from Checkbox problems



UserControl inherit from Checkbox problems Internet User
5/22/2007 11:17:08 AM
vb.net controls: I am attempting to create a user control based on the Checkbox control. It
consists of a single checkbox. When I add my control to a win app, I can't
seem to access the nornal checkbox events it should have inherited.

Here is code for the control:

Imports System.ComponentModel

Public Class MyCheckBoxControl
Inherits System.Windows.Forms.UserControl

End Class

As simple as it could possibly be because in the win app, all I want to do
initially is detect when the check box is checked to confirm it is
functioning as a normal checkbox. Later I'll change some properties
(fontsytle and backcolor) when checked.

But I don't see the CheckedChanged event in the events drop down in the code
editor.

Can't figure out what happened to it.

Thanks in advance.






Re: UserControl inherit from Checkbox problems Ray Cassick
5/22/2007 9:53:03 PM
What about this?

Public Class MyCheckBoxControl : Inherits System.Windows.FormsCheckBox

End Class

[quoted text, click to view]

Re: UserControl inherit from Checkbox problems Internet User
5/24/2007 12:00:00 AM
That works better, thanks!

[quoted text, click to view]

Re: UserControl inherit from Checkbox problems Ray Cassick
5/24/2007 8:30:00 PM
Good, thought I was loosing there for a minute :)

[quoted text, click to view]

AddThis Social Bookmark Button