How do I create a WinForms User Control that has no GUI or designer attachment? An example is like the Timer Control, which you drop onto your form and it docks to the bottom but doesn't have any GUI controls?
2 Answers
You need to use System.ComponentModel.Component as base class.
Example :
class Class1 : System.ComponentModel.Component { } 
3 Comments
27k1
This article will really help anyone. msdn.microsoft.com/en-us/library/9hk12d4y.aspx
Yogurtu
How can I read property ParentForm as with Control base class?
Ben Voigt
@Yogurtu: A
Component has Container and Site properties, which have similar functionality to Parent and ParentForm in GUI controls. When you drop a component onto the designer, the designer automatically generates code that sets these