You are here:About>Computing & Technology>Visual Basic
About.comVisual Basic

VB 6 is The King

Although VB.NET is gaining ground fast, VB 6 remains the most popular programming environment in the entire history of the world! But even if it wasn't as great as it is, it's still the best place to start learning about programming! One reason is that the original BASIC ("Beginner's All purpose Symbolic Instruction Code") was designed as a language to teach people how to program by Kemeny and Kurtz at Dartmouth College w-a-a-a-y back in 1963. A lot of very talented programmers think that VB 6 is still the best development environment. You can check out their reasons here and here. Or perhaps you're reluctant to pay the new, enhanced prices that Microsoft is asking for .NET software. Whatever your reasons, it's clear that VB 6 is going to be around for a good while longer. You can invest in learning how to be an expert programmer using VB 6 and be confident that you're not wasting your time!

Learning VB 6

In the 'Essentials' topic Learning Visual Basic, a program that uses one form with two command buttons was introduced.

We're going to go through the complete steps to create this. First ... in rapid fire ... the steps. Then ... a more complete explanation.

  1. Start Visual Basic. Usually, 'Start > Programs > Microsoft Visual Studio > Microsoft Visual Basic 6.0'. You should see a window similar to this:
  2. Click the default "Standard EXE" icon and then click the "Open" button.
  3. Drag a 'Command Button' from the 'Toolbox' to the form and drop it. Drag another one to the form and drop it.
  4. Click the first 'Command Button' to select it. Open the property window and change the 'Name' property to 'CommandA'.
  5. Select the second 'Command Button' from the drop down window at the top of the property window and then change the 'Name' property to 'CommandB'.
  6. Double click the first 'Command Button' object in the form to open the code window for that button.
  7. Enter the code, Msgbox "You clicked Button A" after the automatically entered code Private Sub CommandA_Click()
  8. Double click the second 'Command Button' object in the form to open the code window for that button.
  9. Enter the code, Msgbox "You clicked Button B" after the automatically entered code Private Sub CommandA_Click()
  10. Click the 'Run' button in the toolbar at the top of the VB 6 development environment window to execute the program.
  11. Click either button A or button B and observe the fruits of your labor!

Whew!!! Continue on to the next page to do this a little slower.

From Dan Mabbutt,
Your Guide to Visual Basic.
FREE Newsletter. Sign Up Now!
Newsletters & RSSEmail to a friendSubmit to Digg
 All Topics | Email Article | | |
Advertising Info | News & Events | Work at About | SiteMap | Reprints | HelpOur Story | Be a Guide
User Agreement | Ethics Policy | Patent Info. | Privacy Policy©2008 About, Inc., A part of The New York Times Company. All rights reserved.