Why should I insert a non-UI Windows.Forms component from the designer?
问题 In C# (and Visual Basic) you can add several non-UI components (those that don't inherit from System.Windows.Forms.Control ) directly from the form designer. Examples of those components are System.Windows.Forms.FolderBrowserDialog and System.Windows.Forms.Timer . But what's the benefit from adding non-UI controls with the UI designer instead of instancing them directly from code? There's a rationale behind that? 回答1: I think using non-UI components in designer at least has these benefits: