Create an Usercontrol

Kodeeswaran Duraisamy 161 Reputation points


I want an usercontrol like fontdialog, printdialog,notifyicon. That the user can set properties but not anything on design time form.


Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,804 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Daniel Zhang-MSFT 9,601 Reputation points

    Hi Kodeeswaran Duraisamy,
    First, you need to add a UserControl to your project by following steps:
    Right-click your project's name-> Add->User Control.
    Run your project and then you can drag the UserControl from ToolBox to form.
    Then you can use Control.Dock property to set UserControl borders are docked to form.
    Such as:

    userControl11.Dock = DockStyle.Top;  

    Best Regards,
    Daniel Zhang

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments