How to remove all the controls on the FlowLayoutPanel Control
Today I will show to you the best way to remove any controls inside a FlowLayoutPanel
How to crte a project in Visual Studio?
Exists many ways to crte a new project in VS. For example, when you open your VS program, in theStart Pageyou will see the optionNewProject ...
For this demonstration, in the Designer View of the Form add some controls like Buttons, RadioButton ... anything, inside of the FlowLayoutPanel.Now, add a button out of the FlowLayoutPanel. Set the text of this button to "Cln"Double-click the button (to open the file and crte the event .Click)
Paste the next
WhileFlowLayoutPanel1.Controls.Count > 0 'Determine if the flow contains any controls
Now press F5 to Debug the appliion.Click the button and you will see all the controls disappr.
No comments:
Post a Comment