Click here to Skip to main content
15,896,557 members
Home / Discussions / C#
   

C#

 
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 
QuestionConverting Word 2007 document to HTML Pin
Sudhir Mangla27-Apr-09 23:29
professionalSudhir Mangla27-Apr-09 23:29 
QuestionVista UAC: run as another user with admin rights Pin
mSh198527-Apr-09 23:22
mSh198527-Apr-09 23:22 
AnswerRe: Vista UAC: run as another user with admin rights Pin
Johnny Jackson28-Apr-09 23:09
Johnny Jackson28-Apr-09 23:09 
AnswerRe: Vista UAC: run as another user with admin rights Pin
mSh198528-Apr-09 23:25
mSh198528-Apr-09 23:25 
QuestionReading media file from a streaming server using a basic directshow player in C# Pin
iFarhan27-Apr-09 23:03
iFarhan27-Apr-09 23:03 
QuestionArgument Pin
BabyOreo27-Apr-09 22:00
BabyOreo27-Apr-09 22:00 
AnswerRe: Argument Pin
Christian Graus27-Apr-09 22:06
protectorChristian Graus27-Apr-09 22:06 
AnswerRe: Argument Pin
musefan27-Apr-09 22:06
musefan27-Apr-09 22:06 
GeneralRe: Argument Pin
CPallini27-Apr-09 22:09
mveCPallini27-Apr-09 22:09 
GeneralRe: Argument Pin
musefan27-Apr-09 23:01
musefan27-Apr-09 23:01 
GeneralRe: Argument Pin
CPallini27-Apr-09 23:04
mveCPallini27-Apr-09 23:04 
GeneralRe: Argument Pin
musefan27-Apr-09 23:46
musefan27-Apr-09 23:46 
GeneralRe: Argument Pin
CPallini27-Apr-09 23:52
mveCPallini27-Apr-09 23:52 
GeneralRe: Argument Pin
musefan28-Apr-09 0:02
musefan28-Apr-09 0:02 

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.