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
How to create a shaped control in .NET
Dinkar Chavhan
Jun 22, 2011
9.2
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
How to create a shaped control in .NET.
Today we will see How to create 3D shaped control in windows c# .Net, This is very simple and easy so lets see step by step execution
Open VS studio 2008/2010 ----file ---new project---windows form
Now on form Take 1 button and give some color on button if u want
Now double click on Button and write code as follow befor that add Namespace System.Drawing
{
This.Close();
}
Now double click on Form Load and write code as follow
{
System.Drawing.Drawing2D.
GraphicsPath
myp =
new
System.Drawing.Drawing2D.
GraphicsPath
();
myp.AddPolygon(
new
Point
[]{
new
Point
(0,0),
new
Point
(0,
this
.Height),
new
Poi
(
this
.Width,0)});
Region
myreg=
new
Region
(myp);
this
.Region=myreg;
}
Now Run application output will come like this
How to create a shaped control in .NET
Next Recommended Reading
How to draw shape?