The Immediate window at the bottom of the IDE (if it’s not visible, choose View» Immediate Window) is a debugging aid. While an application is running, you can stop it and use the Immediate window to examine or change the values of the application’s variables and to execute Visual Basic commands in Immediate mode. The Immediate window is one of the reasons for the popularity of Visual Basic and of the BASIC programming language in general. You can step into !he application’s code while it executes, change the values of the variables or even insert statements in the code, and then .continue the execution of an application. You can use this window to execute immediate statements as if it was the window of an advanced calculator. If you enter the following statement in the Immediate window:
and press Enter, the following will be displayed:
You can also use variables in the Immediate window. If you enter the following lines:
you’ll see the same value as before. The Immediate window is a very versatile tool.
In the following sections, we will develop a few simple projects that demonstrate basic concepts of application development with visual tools and event-driven programming. It’s introductory material, intended for people who are not familiar with visual development or who program with other languages. We’ll look at how to set up an application, design its user interface, and add code. Toward the end of the chapter, I will summarize the principles of event-driven programming and show you how to customize the IDE. This topic is last so that those of you who are not familiar with Visual Basic will acquire some experience with the environment before ‘ you attempt to customize the environment.