1. Home
  2. Computing & Technology
  3. Visual Basic

Chapter 16 - Adding Graphics and Animation Effects

By , About.com Guide

2 of 5

Cooperating With GDI+

math coordinate

math coordinate

Because this lesson makes frequent references to the examples in the book, please read chapter 16 and try the example programs before continuing.

The key to using GDI+ is cooperation. That is, learning to cooperate with GDI+. If you merge your programming smoothly into all the things that GDI+ can do for you, the results are wonderful! If you try to "fight the system" in your code, you'll have real difficulty.

I'm a canoeist and I'm reminded of a motto that I use when I'm shooting rapids in a river:

Ride the river. Don't let the river ride you!

When you're riding a river, that means using the currents and waves to move the canoe where you need it. When you're programming with GDI+, that means using software objects to do all the hard work. To make either of them work, the key is to anticipate what will happen. In programming with GDI+, a lot depends on picking the right event procedure for your graphics code. More on this later.

Or, to pick a different analogy, you might think of GDI+ as a whole factory full of robots, all pre-programmed to do graphical tasks for you. There are the

DrawLine robots and then there are the very specialized DrawBezier robots. Some robots need help from other robots to finish their work.

DrawPolygon can put a square on the screen. You want that square filled with color? You need the

Brush robot then!

Explore Visual Basic
By Category
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic
  4. Learn VB.NET
  5. Adding Graphics and Animation Effects

©2010 About.com, a part of The New York Times Company.

All rights reserved.