Joke Collection Website - Blessing messages - How to dynamically add controls and design the layout of controls in C# WinForm
How to dynamically add controls and design the layout of controls in C# WinForm
Like buttons
button BTN = new button(); //Initialize the control
Btn.size = new size (100,100); //Set the size
Btn.location = new location (50,100); //Set the coordinates
BTN . text = " Button 1 "; //Set the text
this . controls . add(BTN); //Add to the form
That's about it.
- Previous article:How to reset WeChat password
- Next article:How to take a screenshot of Huawei Glory 8C?
- Related articles
- Why sometimes I can't send a text message when the cell phone signal is full?
- What would you do if your favorite person got engaged?
- What if the phone keeps ringing?
- How much is the daily rental fee for the telecom star card?
- Dare to love the text message sent by Lei Lei.
- How can I send a text message to the teacher when I have to ask for leave for ten days?
- What does Changsha No.2 Driving Test Center need to cancel the reservation?
- The Bluetooth switch of the mobile phone is always on, will it be stolen by others? Stealing privacy?
- Wechat can't log in. What if the mobile phone verification code can't log in after logout?
- How to Bind Virtual Numbers in Battle.net International Business?