O'Reilly logo

Graphics Programming with GDI+ by Mahesh Chand

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

2.3. Tutorial: Your First GDI+ Application

In this section you’ll learn how to write your first GDI+ application, step-by-step. You will create a Windows application and draw a few simple objects, such as lines, rectangles, and ellipses, on a Windows Form.

Here are the steps we will cover:

  1. Creating a Windows application

  2. Adding references to the GDI+ library

  3. Obtaining the graphics surface

  4. Setting the graphics surface properties (optional)

  5. Drawing or filling graphics shapes

  6. Releasing objects

  7. Building and running the application

2.3.1. Creating a Windows Application

The first step of this tutorial is to create a Windows application using Visual Studio .NET.

1.
Open Visual Studio .NET, select File | New | Project, and then choose Visual C# Projects ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required