Senior & Expert .Net Developers Discussion Forum by Nyros Technologies

HIRE .Net Expert Developers Programmers Coders From India
Ruby on Rails PHP .Net Developers Community, Nyros Technologies, Kakinada
 
Log in  or IF not a member please REGISTER
Username:
Password:   


Keyword
Log in | Profile 

Polygon in C#.Net.

 
Post new topic   Reply to topic    Senior & Expert .Net Developers Discussion Forum by Nyros Technologies Index -> Programming with C#
View previous topic :: View next topic  
Author Message
Rahul



Joined: 27 Aug 2007
Posts: 127

PostPosted: Thu Jan 28, 2010 7:04 am    Post subject: Polygon in C#.Net. Reply with quote

Hi,

I want to draw a polygon in windows application.So how many co-ordinates i need to consider & which method here i used.

Please give me any suggestions...

Thanks in advance...
Back to top
View user's profile Send private message
Dheeraj



Joined: 27 Aug 2007
Posts: 108

PostPosted: Thu Jan 28, 2010 11:09 am    Post subject: Reply with quote

Hi rahul,

Inorder to draw poligon in Windows application you can use DrawPolygon() method. Please take one button control & develop below code under buttonClick event.

private void button1_Click(object sender, EventArgs e)
{

Point[] p1 = new Point[4];

p1[0] = new Point(0, 45);

p1[1] = new Point(45, 90);

p1[2] = new Point(90, 135);

p1[3] = new Point(135, 200);

Graphics G = this.CreateGraphics();

G.DrawPolygon(Pens.Red, p1);
}

Here we can adjust the values for co-ordinates according to our requirement.

Thank you...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Senior & Expert .Net Developers Discussion Forum by Nyros Technologies Index -> Programming with C#
Page 1 of 1

 latest topics 
 Topics   Replies   Author   Views   Last Post 
No new posts Show Notification in Status Bar in Android Application
0 vijayalakshmi 17 Tue Mar 09, 2010 9:36 am
vijayalakshmi View latest post
No new posts Changing the date and time in SQL Server using T-SQL
0 muralikrishna 31 Fri Mar 05, 2010 3:18 pm
muralikrishna View latest post
No new posts Using TableLayout in Android Layout file:
0 vijayalakshmi 32 Fri Mar 05, 2010 5:03 am
vijayalakshmi View latest post
No new posts TabActivity with Intents in Android:
0 vijayalakshmi 28 Fri Mar 05, 2010 4:46 am
vijayalakshmi View latest post
No new posts Show different components in different styles in Android?
0 vijayalakshmi 25 Fri Mar 05, 2010 3:39 am
vijayalakshmi View latest post
No new posts VIEWSTATE SIZE BYTES SHOWS 0 IN TRACE.AXD
1 sanjoo8959 40 Wed Mar 03, 2010 9:18 am
Dileep View latest post
No new posts How to mark incoming Sms as read in Android programatically?
0 vijayalakshmi 31 Mon Mar 01, 2010 1:12 pm
vijayalakshmi View latest post
No new posts How to control(Start,Stop) windows Services in C#?
0 Raghavendra 37 Mon Mar 01, 2010 12:57 pm
Raghavendra View latest post
No new posts Dialog Box with Spinner View in Android:
0 vijayalakshmi 69 Mon Mar 01, 2010 12:24 pm
vijayalakshmi View latest post
No new posts How many PCs in the world have the .NET Framework installed?
0 Raghavendra 33 Mon Mar 01, 2010 11:51 am
Raghavendra View latest post




Hire an expert .Net developer / coder / programmer or development team from India now!!

Other Forums : Ruby on Rails   ::   PHP   |   Free unlimited HTML CSS templates download

Nyros Technologies   |   Kakinada City Portal   |   Developers Blog   |   About .Net Experts   |   More