In the previous page, we went through the 'Two Button Form' at Internet speed. We're going to look at it in detail and explain all the steps this time.
Step 1 and Step 2
Start Visual Basic. Usually, 'Start > Programs > Microsoft Visual Studio > Microsoft Visual Basic 6.0'.
Click the default "Standard EXE" icon and then click the "Open" button.
You should see the opening dialog window as explained in Learning Visual Basic. Check that page out for more.
Step 3
Drag a 'Command Button' from the 'Toolbox' to the form and drop it. Drag another one to the form and drop it.
The VB 6 development environment is designed to let you constantly change the components that are visible so you can work with only those windows that apply to the problem at hand. The 'ToolBox' is one of those components and may, or may not, be visible in your system. The 'Toolbox' looks like this: (The tools that are in the toolbox can change too!)
If you can't see the toolbox, look for it in the 'View' menu. And notice that several other components can be turned on and off there, too. Some that you will use are:
- Project Explorer
- Immediate Window
- Locals Window
- Watch Window
Another thing to know is that VB 6 uses the right-click 'context menu' a lot. Right click 'Form1' for example and notice the options there. This is the fastest way to switch between viewing an object (like Form1) and the code in that object.
Next page >
Finishing the Two Button Form > Page
1,
2,
3,
4,