Custom Control Initialization - first time drop on win form
-
I am writing a small custom win form control (i.e. UserControl). I would like to pop up a wizard the first time the user places the control on a windows form. I cannot figure out how to tell the first time a control is places??? I cannot seem to find any methods or properties in the designer class. Can anyone help here? Thanks!
-
I am writing a small custom win form control (i.e. UserControl). I would like to pop up a wizard the first time the user places the control on a windows form. I cannot figure out how to tell the first time a control is places??? I cannot seem to find any methods or properties in the designer class. Can anyone help here? Thanks!
Implement a
ControlDesigner
for your class and attribute yourUserControl
with theDesignerAttribute
specifying theType
or type string for the designer class. In your implementation ofInitialize
orOnSetComponentDefaults
, you could pop up a wizard dialog or whatever you want.Microsoft MVP, Visual C# My Articles