In my program, I have a menu on one of my windows. On clicking on one of the menu items, I link to another window. However the text meant to display in the window is not displaying. I accept the display to happen without pressing any button.
- private void Form1_Load(object sender, EventArgs e)
- {
-
- Label mylab = new Label();
- mylab.Text = "GeeksforGeeks";
- mylab.Location = new Point(222, 90);
- mylab.AutoSize = true;
- mylab.Font = new Font("Calibri", 18);
- mylab.BorderStyle = BorderStyle.Fixed3D;
- mylab.ForeColor = Color.Green;
- mylab.Padding = new Padding(6);
-
-
- this.Controls.Add(mylab);
-
-
- Label mylab1 = new Label();
- mylab1.Text = "Welcome To GeeksforGeeks";
- mylab1.Location = new Point(155, 170);
- mylab1.AutoSize = true;
- mylab1.BorderStyle = BorderStyle.Fixed3D;
- mylab1.Font = new Font("Calibri", 18);
- mylab1.Padding = new Padding(6);
-
-
- this.Controls.Add(mylab1);
- }
When the window loads, its turns up empty.