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
cad sunny
NA
138
22.8k
How to draw widthwise and height wise when i click button
Apr 3 2020 7:01 AM
hi,
i have label1 ,label2 and textbox1,textbox2
label1.back color is Black.
label2.back color is White.
i want if i enter text in textbox1 like
10-A
3-B
and textbox2
10-A
3-B
here A = Label1.Back color i.e Black
Here B = Label2.back color.i.e White
Now,i want to click button or Mouse click on picturebox event draw Like Picture uploaded below
this below code is only for refrence idea
private
void
Form1_Paint(
object
sender, PaintEventArgs e)
{
Graphics gForm =
this
.CreateGraphics();
gForm.FillRectangle(Brushes.Black,
this
.ClientRectangle);
for
(
int
i = 1; i <= 100; ++i)
{
Rectangle r =
new
Rectangle(i * 40 - 15, 0, 15,
this
.ClientRectangle.Height);
//Rectangle r = new Rectangle(i * 40 - 15, 0, 15, this.ClientRectangle.Width);
gForm.FillRectangle(Brushes.Gray, r);
}
}
Please Help with source code
Reply
Answers (
0
)
Get Multiple location in c#.
streaming video in vlc