Chapter 2: Writing Your First Program


Chapter 2

Writing Your First Program

After completing this chapter, you will be able to:

  • Create the user interface for a new program.

  • Set the properties for each object in your user interface.

  • Write program code.

  • Save and run the program.

  • Build an executable file.

As you learned in Chapter 1, the Microsoft Visual Studio 2005 Integrated Development Environment (IDE) contains several powerful tools to help you run and manage your programs. Visual Studio also contains everything you need to build your own applications for Microsoft Windows and the Web from the ground up.

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 Microsoft Visual Basic 2005, including the following:

  • The Visual Studio 2005 IDE provides a few different menus and toolbars with which you can build your programs. For example, Visual Basic 6 includes the Format, Run, and Add-Ins menus, which aren't included in Visual Studio. Most of the commands have been relocated—for example, you'll find many of the Run menu commands on the Debug menu.

  • The CommandButton control is named the Button control in Visual Studio 2005, and many of its properties and methods have changed. For example, the Caption property is now named the Text property.

  • Some of the properties and methods for the Label control are new or have changed. For example, the Caption property is now named the Text property, and the TextAlign property has more alignment options than the previous Alignment property.

  • The Image control has been removed from Visual Studio. To display pictures, use the PictureBox control.

In this chapter, you'll learn how to create a simple but attractive user interface with the controls in the Visual Studio Toolbox. Next you'll learn how to customize the operation of these controls with property settings. Then you'll see how to identify just what your program should do by writing program code. Finally, you'll learn how to save and run your new program (a Las Vegas–style slot machine) and how to compile it as an executable file.



Microsoft Visual Basic 2005 Step by Step
Microsoft Visual Basic 2005 Step by Step (Step by Step (Microsoft))
ISBN: B003E7EV06
EAN: N/A
Year: 2003
Pages: 168

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net