So far, you have built user interfaces entirely from existing controls or controls that you created based on other controls. When you are writing programs with Visual Basic 2008, you also have the freedom to draw your own user interface. This gives you absolute freedom over the look and feel of your programs, and makes certain programming tasks possible.
In this chapter, you look at the graphics and drawing functionality available in Visual Basic 2008. You will be introduced to the concepts by building a fairly complex drawing program, just to illustrate how simple drawing your own user interface actually is. Toward the end of the chapter, you will examine some of the multimedia features of Visual Basic 2008 and learn how you can display common Internet file formats such as
In this chapter, you will:
Learn about the
Use pens and brushes
Learn how to select and use colors
Size and stretch images
Create your own Paint program
In this section, you create a simple Paint program by creating a new Windows application project and building some user controls that you will wire up to provide functionality for the application.
Your motivation for building user controls for this application is simple: its good practice to break the application down into components. By following this technique, if you want to pull your paint functionality out of this ...