Library tutorials & articles

Drawing on a Form

Page 1 of 2
  1. Introduction
  2. The Code

Introduction

Choose an appropriate name for your Form.  I changed the name Form1, to FDraw.  In the Properties window for your Form, set the BackColor.  I use White for my drawing surface.

Use the Object Browser, to see what methods in your base class can be overridden.  In the View menu, go to Other Windows and select Object Browser.  Look for the OnPaint function in the Form class as shown in the screen shot.

Comments

  1. 22 Jun 2008 at 15:03

     

  2. 22 Jun 2008 at 15:02

    I DRAW THE LINE ON PANEL BETWEEN TWO USER CONTROLS

    BUT I WANT MORE ON DRAWING LINES BETWEEN TWO USER CONTROLS

    WITH ARROW MARK WHICH IS URGETN

    USING PANEL PAINT U CAN DRAW IT.

    PLS HELP

  3. 12 Apr 2006 at 22:05

    this is really good, but will u plz code the same thing in vb.net too? and how can we do painting i.e something like in ms-paint.

    thanks

    Manpreet

  4. 01 Jan 1999 at 00:00

    This thread is for discussions of Drawing on a Form.

Leave a comment

Sign in or Join us (it's free).

Bill Burris

Want to stay in touch with what's going on? Follow us on twitter!