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
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Give Mixed Color(gradient) for Windows Form Background
Rafnas T P
Feb 22
2016
Code
2.1
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
protected
override
void
OnPaintBackground(PaintEventArgs e)
{
Rectangle r =
this
.ClientRectangle;
if
(r.Width > 0 && r.Height > 0)
{
using
(LinearGradientBrush brush =
new
LinearGradientBrush(
this
.ClientRectangle, Color.MintCream, Color.DodgerBlue, 90 F))
{
e.Graphics.FillRectangle(brush,
this
.ClientRectangle);
}
}
}
Windows Form
Background Colour
C#