You must Sign In to post a response.
  • Category: .NET

    how to draw various autoshapes in C# window forms?

    The forum thread has not been reviewed by Editors yet. Readers are advised to use their best judgement before accessing this thread.
    This thread will be reviewed shortly.
    If you think this thread contain inappropriate content, please report to webmaster.
    how can i draw autoshapes (circles,squre,triangle,oval of desired size.) in a window form?
    eg: if i want to draw a human face n various actions when mouse pointer moves on various parts of it.
  • #94
    Use the Graphics object for drawing shapes,

    Refer System.Drawing namespace.

    Since there is no option to upload the sameple applications, i cannot upload the simple paint
    application which i developed.

  • #100
    thank u sir 4 ur kind response,if possible plz send the application through the mail.

  • #134
    This is the code for drawing shapes, Assume that this code is in a WinForm
    Call this method on some event handler, say button click

    <font style="FONT-SIZE: 12px; COLOR: blue; FONT-FAMILY: 'Courier New'" >

    public void DrawShapes()
    SolidBrush sBrush = new SolidBrush(Color.Black);
    Pen drawPen = new Pen(sBrush);
    Graphics g = this.CreateGraphics();



  • #198920

  • #203854
    Refer System.Drawing namespace.
    Software Engg.

  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.