I have added one button in designer.cs file and second button creating runtime on first button click. Tell me on which thread button1 and button2 created
- using System;
- using System.Drawing; using System.Windows.Forms;
- namespace WinformTest {public partial class Form1 : Form{public Form1()
- {
- InitializeComponent();
- //button1 added at designer.cs
- }
- private void button1_Click(object sender, EventArgs e)
- {
- //Dynamically creating button2.
- Button button2 = new Button();
- button2.Location = new Point(112, 33);
- button2.Name = "button2";
- button2.Size = new Size(78, 33);
- button2.TabIndex = 1;
- button2.Text = "button2";
- }
Kiran MohantyPosted Nov 25, 2020, 3:01 AM
PatelPosted Nov 25, 2020, 7:44 AM
Sachin SinghPosted Nov 25, 2020, 3:37 AM