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.

AddThis

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

Leave a comment

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

Related discussion

Related jobs

Events coming up

  • Nov 19

    C# 3.0 and LINQ with Visual Studio 2008 Training Course

    London, United Kingdom

    This course has been developed to help existing C#.NET 2.0 programmers and developers upgrade their .NET development skills and learn about the new features of Microsoft's C# 3.0 and LINQ to XML and ADO.NET using Visual Studio 2008 (currently codenamed Orcas).