Click here to Skip to main content
15,894,343 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to add a larger cap to a line? Pin
Dario Solera7-Sep-05 20:56
Dario Solera7-Sep-05 20:56 
GeneralRe: How to add a larger cap to a line? Pin
radic.feng7-Sep-05 21:40
radic.feng7-Sep-05 21:40 
GeneralRe: How to add a larger cap to a line? Pin
Dario Solera7-Sep-05 22:06
Dario Solera7-Sep-05 22:06 
QuestionRe: How to add a larger cap to a line? Pin
Guffa8-Sep-05 1:17
Guffa8-Sep-05 1:17 
AnswerRe: How to add a larger cap to a line? Pin
radic.feng8-Sep-05 14:39
radic.feng8-Sep-05 14:39 
Questiondatagrid search Pin
Pyro Joe7-Sep-05 16:38
Pyro Joe7-Sep-05 16:38 
AnswerRe: datagrid search Pin
| Muhammad Waqas Butt |8-Sep-05 3:47
professional| Muhammad Waqas Butt |8-Sep-05 3:47 
QuestionErase Line Drawn?? I give up... Pin
Anonymous7-Sep-05 16:14
Anonymous7-Sep-05 16:14 
Here's the code..... If anyone can tell me how to get the form to erase the previous line when I click the ok button. I'd appreciate it. Each time I click the "OK" button it just draws line after line w/ out erasing the previous line....thanks...

///////////////////////
//BLOCK 1:
private void complexA_OK_Click(object sender, System.EventArgs e)
{
Graphics g = this.CreateGraphics();
Pen cmplxAPen = new Pen(Color.Crimson);
//
try
{
double valAReal;
double valAComplex;
valAReal = Convert.ToDouble(this.textComplexAReal.Text);
valAComplex = Convert.ToDouble(this.textComplexAComplex.Text);
DrawComplexNumber(g, valAReal, valAComplex);
}
catch
{
MessageBox.Show("Invalid Complex A Number", "Error!");
}
}

///////////////////////////////////////////////
//BLOCK 2:
private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{

DrawGraphRectF(e.Graphics);
DrawXYAxes(e.Graphics);
DrawGraphXandYTicks(e.Graphics);
}
///////////////////////////////////////////////
//BLOCK 3:
void DrawComplexNumber(Graphics g, double re_, double im_)
{
Pen cmplxPen = new Pen(Color.DarkGray, 4);
g.DrawLine(cmplxPen, (xIndent + graphRect.Width/2), (yIndent + graphRect.Height/2), (xIndent + graphRect.Width/2) + (float)(re_ * xIndent), (yIndent + graphRect.Height/2) - (float)(im_ * yIndent));
//Pen cmplxEraseLinePen = new Pen(Color.Snow, 4);
//g.DrawLine(cmplxEraseLinePen, (xIndent + graphRect.Width/2), (yIndent + graphRect.Height/2), (xIndent + graphRect.Width/2) + (float)(re_ * xIndent), (yIndent + graphRect.Height/2) - (float)(im_ * yIndent));

}

[Reply][View Thread][Get Link] [Modify|Delete

AnswerRe: Erase Line Drawn?? I give up... Pin
Christian Graus7-Sep-05 16:26
protectorChristian Graus7-Sep-05 16:26 
GeneralRe: Erase Line Drawn?? I give up... Pin
Anonymous7-Sep-05 17:01
Anonymous7-Sep-05 17:01 
GeneralRe: Erase Line Drawn?? I give up... Pin
Christian Graus7-Sep-05 17:13
protectorChristian Graus7-Sep-05 17:13 
QuestionStuck Trying to erase lines drawn... Pin
Anonymous7-Sep-05 14:48
Anonymous7-Sep-05 14:48 
AnswerRe: Stuck Trying to erase lines drawn... Pin
Andy Brummer7-Sep-05 15:20
sitebuilderAndy Brummer7-Sep-05 15:20 
GeneralRe: Stuck Trying to erase lines drawn... Pin
Anonymous7-Sep-05 15:50
Anonymous7-Sep-05 15:50 
GeneralRe: Stuck Trying to erase lines drawn... Pin
Andy Brummer7-Sep-05 16:58
sitebuilderAndy Brummer7-Sep-05 16:58 
QuestionProblem with Database Pin
Expert Coming7-Sep-05 13:40
Expert Coming7-Sep-05 13:40 
AnswerRe: Problem with Database Pin
philip_cole7-Sep-05 13:53
philip_cole7-Sep-05 13:53 
GeneralRe: Problem with Database Pin
Expert Coming7-Sep-05 13:56
Expert Coming7-Sep-05 13:56 
QuestionGetting Time Changes Pin
monrobot137-Sep-05 12:15
monrobot137-Sep-05 12:15 
QuestionStrong name key file questions Pin
machocr7-Sep-05 11:34
machocr7-Sep-05 11:34 
AnswerRe: Strong name key file questions Pin
machocr7-Sep-05 12:29
machocr7-Sep-05 12:29 
QuestionCom+ Work as Web services Pin
webhay7-Sep-05 10:42
webhay7-Sep-05 10:42 
QuestionDrag & Drop to Windows Explorer Shell Pin
Judah Gabriel Himango7-Sep-05 9:49
sponsorJudah Gabriel Himango7-Sep-05 9:49 
AnswerRe: Drag & Drop to Windows Explorer Shell Pin
Judah Gabriel Himango7-Sep-05 11:35
sponsorJudah Gabriel Himango7-Sep-05 11:35 
QuestionInternal TCP traffic Pin
BeginnerC#7-Sep-05 9:37
BeginnerC#7-Sep-05 9:37 

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.