TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
George William
NA
10
1.1k
Trying to display
Feb 2 2021 2:34 AM
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)
{
// Creating and setting the label
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);
// Adding this control to the form
this
.Controls.Add(mylab);
// Creating and setting the label
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);
// Adding this control to the form
this
.Controls.Add(mylab1);
}
When the window loads, its turns up empty.
Reply
Answers (
1
)
How can I prevent DRY for this method?
How to set Download file in download buttone c#.NET