Click here to Skip to main content
15,919,931 members
Home / Discussions / C#
   

C#

 
AnswerRe: Conditional compilation for 1.1 and 2.0 Pin
Mark DeVol29-Nov-05 11:15
Mark DeVol29-Nov-05 11:15 
QuestionNeed a best possible solution/advice Pin
pavanbabut28-Nov-05 8:43
pavanbabut28-Nov-05 8:43 
AnswerRe: Need a best possible solution/advice Pin
Dan Neely28-Nov-05 9:32
Dan Neely28-Nov-05 9:32 
GeneralRe: Need a best possible solution/advice Pin
pavanbabut28-Nov-05 9:48
pavanbabut28-Nov-05 9:48 
QuestionHosted controls in a User Control Pin
Leyu28-Nov-05 8:41
Leyu28-Nov-05 8:41 
QuestionGarbage Collection Question (How to Prevent) Pin
CarolAnnLove28-Nov-05 8:24
CarolAnnLove28-Nov-05 8:24 
AnswerRe: Garbage Collection Question (How to Prevent) Pin
Judah Gabriel Himango28-Nov-05 9:12
sponsorJudah Gabriel Himango28-Nov-05 9:12 
QuestionStill stuck: Button, Numeric UpDown, and Paint Event Pin
...---...28-Nov-05 6:40
...---...28-Nov-05 6:40 
Hi,
I have posted this question a few days ago and have recieved some answers but still can't seem yto get this to work. I want to pass the value of a
NumericUpDown control as a parameter to draw a line on a WinForm. The line will be drawn when the Button is clicked. I think I'm not setting the bool flag that determines if the line should be drawn correctly --

//Why doesn't this work?? -- thanks in advance......


private bool goAheadAndDrawTheLine;

private void Form1_Paint( object sender, System.Windows.Forms.PaintEventArgs e )
{
Graphics g = e.Graphics;
if( goAheadAndDrawTheLine )
DrawMyLine(g);
}

public void DrawMyLine( Graphics g )
{

{
g.DrawLine( somePen, 0, 0, 100, this.numericUpDown1.Value );
}
}

private void DrawA_Click( object sender, System.EventArgs e )
{
goAheadAndDrawTheLine = true;
}

AnswerRe: Still stuck: Button, Numeric UpDown, and Paint Event Pin
KaptinKrunch28-Nov-05 7:34
KaptinKrunch28-Nov-05 7:34 
AnswerRe: Still stuck: Button, Numeric UpDown, and Paint Event Pin
Judah Gabriel Himango28-Nov-05 7:34
sponsorJudah Gabriel Himango28-Nov-05 7:34 
GeneralRe: Still stuck: Button, Numeric UpDown, and Paint Event Pin
...---...28-Nov-05 13:14
...---...28-Nov-05 13:14 
QuestionCreating custom control.. dunno how to create click event Pin
2hdass28-Nov-05 6:10
2hdass28-Nov-05 6:10 
AnswerRe: Creating custom control.. dunno how to create click event Pin
Judah Gabriel Himango28-Nov-05 7:37
sponsorJudah Gabriel Himango28-Nov-05 7:37 
AnswerRe: Creating custom control.. dunno how to create click event Pin
Darryl Borden28-Nov-05 11:51
Darryl Borden28-Nov-05 11:51 
Questionerror Pin
papa198028-Nov-05 5:59
papa198028-Nov-05 5:59 
AnswerRe: error Pin
Judah Gabriel Himango28-Nov-05 7:39
sponsorJudah Gabriel Himango28-Nov-05 7:39 
Questionvoid pointers and buffers Pin
sjdevo3gsr28-Nov-05 5:56
sjdevo3gsr28-Nov-05 5:56 
AnswerRe: void pointers and buffers Pin
leppie28-Nov-05 6:00
leppie28-Nov-05 6:00 
Questionproblem showing that a button's in focus Pin
melanieab28-Nov-05 5:24
melanieab28-Nov-05 5:24 
Questionautomate a login using AxWebBrowser Pin
mjmcinto28-Nov-05 4:34
mjmcinto28-Nov-05 4:34 
Questionget data from data set Pin
MffM28-Nov-05 4:31
MffM28-Nov-05 4:31 
AnswerRe: get data from data set Pin
Steve Maier28-Nov-05 4:40
professionalSteve Maier28-Nov-05 4:40 
Questionage = (byte)(generator.NextDouble() * 100 - 20); gives extremely high values Pin
ishlilith28-Nov-05 3:19
ishlilith28-Nov-05 3:19 
AnswerRe: age = (byte)(generator.NextDouble() * 100 - 20); gives extremely high values Pin
Guffa28-Nov-05 4:01
Guffa28-Nov-05 4:01 
GeneralRe: age = (byte)(generator.NextDouble() * 100 - 20); gives extremely high values Pin
ishlilith28-Nov-05 4:18
ishlilith28-Nov-05 4:18 

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.