Microsoft Visual Basic 2005 Step by Step (Step by Step (Microsoft))

Chapter 15

Adding Graphics and Animation Effects

After completing this chapter, you will be able to:

For many developers, adding artwork and special effects to an application is the most exciting—and addictive—part of programming. Fortunately, creating impressive and useful graphical effects with Microsoft Visual Basic 2005 is both satisfying and easy.

In this chapter, you'll learn how to add a number of visually interesting features to your programs. You'll learn how to create compelling artwork on a form, how to create simple animation effects by using PictureBox and Timer controls, and how to expand or shrink objects at run time by using the Height and Width properties. You'll also learn how to change the transparency of the form. When you've finished, you'll have many of the skills you need to create a visually exciting user interface.

What will you be able to do on your own? This is the point when your imagination takes over. One of my favorite results is from a reader of a previous version of this book who used what he had learned about Visual Basic and graphics to build his own electrocardiograph machine, complete with analog circuitry and a Windows form displaying digital data from the homemade EKG. If this isn't your idea of fun, you might more modestly decide to enhance your application's start page so that it contains custom artwork and visual effects—perhaps in combination with one or more digital photographs loaded into picture box objects on a form.

Even game programmers can have some serious fun using graphics in Visual Basic and Visual Studio. However, if you're planning on creating the next version of Microsoft Zoo Tycoon or Microsoft Halo, you had better plan for much more than visual output. Modern video games contain huge libraries of objects and complex formulas for rendering graphical images that go well beyond the scope of this book. But that still leaves a lot of room for experimentation and fun!

Upgrade Notes: Migrating Visual Basic 6 Code to Visual Basic 2005

If you're experienced with Microsoft Visual Basic 6, you'll notice some new features in Visual Basic 2005, including the following:

Категории