Click here to Skip to main content
15,921,941 members
Home / Discussions / C#
   

C#

 
GeneralRe: help!! question Pin
Dave Kreskowiak9-May-14 15:15
mveDave Kreskowiak9-May-14 15:15 
GeneralRe: help!! question Pin
Dave Kreskowiak9-May-14 7:14
mveDave Kreskowiak9-May-14 7:14 
GeneralRe: help!! question Pin
Osama Kaiser9-May-14 7:17
Osama Kaiser9-May-14 7:17 
GeneralRe: help!! question Pin
Matty2218-May-14 18:17
Matty2218-May-14 18:17 
AnswerRe: help!! question Pin
Pete O'Hanlon9-May-14 6:43
mvePete O'Hanlon9-May-14 6:43 
GeneralRe: help!! question Pin
Osama Kaiser9-May-14 7:08
Osama Kaiser9-May-14 7:08 
AnswerRe: help!! question Pin
thatraja9-May-14 8:00
professionalthatraja9-May-14 8:00 
AnswerRe: help!! question Pin
OriginalGriff9-May-14 8:02
mveOriginalGriff9-May-14 8:02 
AnswerRe: help!! question Pin
Gerry Schmitz9-May-14 12:16
mveGerry Schmitz9-May-14 12:16 
Questionc# console application sharing variables with visual basic Pin
Papatrexas9-May-14 2:36
Papatrexas9-May-14 2:36 
AnswerRe: c# console application sharing variables with visual basic Pin
Rob Philpott9-May-14 3:35
Rob Philpott9-May-14 3:35 
AnswerRe: c# console application sharing variables with visual basic Pin
Wayne Gaylard9-May-14 3:36
professionalWayne Gaylard9-May-14 3:36 
Questionin the same class we are having two methods like method Add() and Static Method Sub() here...? Can i Cal Static method Sub() from non static method Add() Pin
balaramanN9-May-14 0:08
balaramanN9-May-14 0:08 
AnswerRe: in the same class we are having two methods like method Add() and Static Method Sub() here...? Can i Cal Static method Sub() from non static method Add() Pin
Richard MacCutchan9-May-14 0:25
mveRichard MacCutchan9-May-14 0:25 
QuestionImplementing IDisposable Pin
Gilbert Consellado8-May-14 22:58
professionalGilbert Consellado8-May-14 22:58 
AnswerRe: Implementing IDisposable Pin
Pete O'Hanlon8-May-14 23:58
mvePete O'Hanlon8-May-14 23:58 
GeneralRe: Implementing IDisposable Pin
Gilbert Consellado9-May-14 0:05
professionalGilbert Consellado9-May-14 0:05 
GeneralRe: Implementing IDisposable Pin
Pete O'Hanlon9-May-14 0:36
mvePete O'Hanlon9-May-14 0:36 
GeneralRe: Implementing IDisposable Pin
Gilbert Consellado9-May-14 1:11
professionalGilbert Consellado9-May-14 1:11 
GeneralRe: Implementing IDisposable Pin
Dave Kreskowiak9-May-14 1:26
mveDave Kreskowiak9-May-14 1:26 
GeneralRe: Implementing IDisposable Pin
Gilbert Consellado9-May-14 1:38
professionalGilbert Consellado9-May-14 1:38 
Questionpolling call to a url Pin
nitin_ion8-May-14 20:38
nitin_ion8-May-14 20:38 
AnswerRe: polling call to a url Pin
Pete O'Hanlon8-May-14 20:52
mvePete O'Hanlon8-May-14 20:52 
QuestionDrawing a rectangle using GraphicsPath in C# doesn't complete the drawing (GDI+) Pin
jesuraj.pradeep8-May-14 20:05
jesuraj.pradeep8-May-14 20:05 
I have to draw a rectangle using lines whose co-ordinates and measures are already provided.

In the below code, if I call CloseFigure function. C# assumes the drawing is incomplete and hence it draws an another line diagonally to close the rectangle.

If I use a AddRectangle function, the drawing is complete. No issues with that.

How can I complete a drawing, properly using lines?

private void OnPaint(object sender, PaintEventArgs e)
{
Pen redPen = new Pen(Color.Red, 2);
// Create a graphics path
GraphicsPath path = new GraphicsPath();
// Add two lines, a rectangle and an ellipse
Graphics g = e.Graphics;
path.StartFigure();

path.AddLine(20, 20, 20, 400); // left
path.AddLine(20, 20, 400, 20); //top
path.AddLine(400, 20, 400, 400); // right
path.AddLine(20, 400, 400, 400); // bottom

path.CloseFigure();
//This will close the drawing, by drawing a line between starting and ending point
}
AnswerRe: Drawing a rectangle using GraphicsPath in C# doesn't complete the drawing (GDI+) Pin
Bernhard Hiller8-May-14 21:36
Bernhard Hiller8-May-14 21:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.