Click here to Skip to main content
15,906,081 members
Home / Discussions / C#
   

C#

 
AnswerRe: MSBuild / Microsoft.Build... nyaaargh! Pin
SeMartens28-Apr-09 1:41
SeMartens28-Apr-09 1:41 
AnswerRe: MSBuild / Microsoft.Build... nyaaargh! Pin
Wenff29-Apr-09 6:00
professionalWenff29-Apr-09 6:00 
QuestionDataGridView index problem = VS2008 C# Pin
DlogDash28-Apr-09 1:08
DlogDash28-Apr-09 1:08 
AnswerRe: DataGridView index problem = VS2008 C# Pin
musefan28-Apr-09 2:20
musefan28-Apr-09 2:20 
GeneralRe: DataGridView index problem = VS2008 C# [modified] Pin
DlogDash28-Apr-09 11:27
DlogDash28-Apr-09 11:27 
QuestionRegular Expression validator for currecny Pin
Member 254517628-Apr-09 1:03
Member 254517628-Apr-09 1:03 
AnswerRe: Regular Expression validator for currecny Pin
musefan28-Apr-09 2:16
musefan28-Apr-09 2:16 
GeneralRe: Regular Expression validator for currecny Pin
Member 254517628-Apr-09 2:20
Member 254517628-Apr-09 2:20 
GeneralRe: Regular Expression validator for currecny Pin
musefan28-Apr-09 2:48
musefan28-Apr-09 2:48 
GeneralRe: Regular Expression validator for currecny Pin
Member 254517629-Apr-09 18:00
Member 254517629-Apr-09 18:00 
QuestionAbout the certification validation period Pin
Roshanakak28-Apr-09 0:56
Roshanakak28-Apr-09 0:56 
QuestionUsing Block - Call Function Pin
dataminers28-Apr-09 0:46
dataminers28-Apr-09 0:46 
AnswerRe: Using Block - Call Function Pin
SeMartens28-Apr-09 0:51
SeMartens28-Apr-09 0:51 
QuestionHelp with drawing Pin
Johnny Jackson28-Apr-09 0:10
Johnny Jackson28-Apr-09 0:10 
AnswerRe: Help with drawing Pin
Henry Minute28-Apr-09 0:32
Henry Minute28-Apr-09 0:32 
AnswerRe: Help with drawing Pin
Bharat Jain28-Apr-09 0:34
Bharat Jain28-Apr-09 0:34 
AnswerRe: Help with drawing Pin
Rob Philpott28-Apr-09 0:56
Rob Philpott28-Apr-09 0:56 
GeneralRe: Help with drawing Pin
Johnny Jackson28-Apr-09 1:40
Johnny Jackson28-Apr-09 1:40 
GeneralRe: Help with drawing Pin
musefan28-Apr-09 2:04
musefan28-Apr-09 2:04 
GeneralRe: Help with drawing Pin
Johnny Jackson28-Apr-09 20:15
Johnny Jackson28-Apr-09 20:15 
GeneralRe: Help with drawing Pin
musefan28-Apr-09 22:01
musefan28-Apr-09 22:01 
GeneralRe: Help with drawing [modified] Pin
Johnny Jackson28-Apr-09 22:57
Johnny Jackson28-Apr-09 22:57 
The only thing i don't understand is that I thought it would be more appropriate to use a refresh event opposed to the invalidate event you suggested, is there a significant difference in the two events?

Ok what i have from the ground up is:

A class called shapes which contains all the code for drawing the shapes
public static void Square(Graphics g)
{
    g.DrawSquare(Pens.Blue, 10, 10, this.width, this.height);
}

etc

and then in the form i have a resize event which contains the code to draw the shapes
private void DrawBoard_Paint(object sender, PaintEventArgs e)
{
    Draw.Square(e.Graphics);
}


and for the resize event I have

private void DrawBoard_Resize(object sender, EventArgs e)
{
    this.Refresh();
}


what i specifically need help with is (as said by someone else) to "call the function that you have written in the class." because it's multiple shapes being drawn and each being drawn on demand not when the app starts and I also need to pass the width and height parameter on the click event I would assume.

in a nutshell I don't know the code to cause the click event to call upon the function in the class that draws the shape as well as the code to pass the width and height to the class

Thanks in advance.

modified on Wednesday, April 29, 2009 7:13 AM

GeneralRe: Help with drawing Pin
musefan29-Apr-09 2:27
musefan29-Apr-09 2:27 
QuestionCreating Excel Pin
justindhas28-Apr-09 0:08
justindhas28-Apr-09 0:08 
AnswerRe: Creating Excel Pin
Henry Minute28-Apr-09 0:24
Henry Minute28-Apr-09 0:24 

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.