1

To make a custom control in .NET you can subclass the System.Windows.Forms.Control or the UserControl class. If you don't need to add controls in it, what's the best choice?

Thanks.

abenci
  • 8,422
  • 19
  • 69
  • 134

2 Answers2

3

The biggest difference between Control and UserControl is that UserControl is designed to hold content. It derives from ScorllableControl and ContainerControl and hence gets many of their capabilities. If you want to add child Controls then this is the best choice. In your case though you're not adding any child controls. You still may want UserControl if you need scrolling but otherwise use Control

JaredPar
  • 733,204
  • 149
  • 1,241
  • 1,454
1

I think you can have your answer here ;-)

Control vs UserControl in WinForms?

Community
  • 1
  • 1
zapico
  • 2,396
  • 1
  • 21
  • 45