Thursday, October 15, 2020

 

In the Designer, you can drop and arrange any controls on the user control that you like, setting their properties and handling events just as on a form.  shows a sample user control as seen in the Designer

 

A User Control Shown in the Designer


When you're happy with your control, you can add it to the Toolbox by dragging the user control's source code file, in this case UserControl1.cs, from the Solution Explorer to the Toolbox. When it's there, you can drag and drop it onto the forms of your choice, setting properties and handling events via the Property Browser just as with any of the built-in controls. shows the user control from  hosted on a form.  


User controls aren't the only kind of custom controls. If you're interested in drawing the contents of your controls yourself, scrolling your controls, or getting more details about user controls, you'll want to read

No comments:

Post a Comment

 Application Settings As some applications get more sophisticated, users expect more from all their applications. For example, some applicat...