As a general rule: Play with it. You're very unlikely to break anything that matters, so just explore and experiment with the IDE, and you'll learn more.
Creating A Project
Description of the IDE
Setting up the IDE
Don't allow sloppiness
Get rid of silliness
On the bottom-right of the IDE, close the "Form Layout" pane because its pretty much useless.
Access to handy functions
You can now use these commands by selecting a block of text in your source code then hitting one of these commands to do the specified function on the whole block of code. Handy.
Changing Properties of Objects
If you click on an object on your form, or even the form itself, you gain access to the properties of that item and change them in the properties pane on the right side of the screen.
Placing controls on a form
All of the items on the left-hand of the screen, in the toolbox pane, are able to be added to a form like this:
Importing extra controls
If you want to use a control which is not included in VB6's "Standard EXE" toolbox of 21 controls, you'll need to import them like this:
When you press the Alt button in many programs you're shown little lines underneath certain letters of menu items. If you then press on your keyboard a letter which corresponds to one of the underlined letters then that menu item is selected.
In VB6, to get that functionality all you have to do is place an apersand (&) the letter before the letter you want to be underlined and functional in this way.
This functionality exists in:
Running A Program
Take a look in the menu item "Run".
You will find that:
Stopping A Program
When you are done testing your application, you will want to close it. There are several ways to accomplish this.
The following options should be used only in the case that your program has stalled and you cannot close it by pressing Alt+F4 or the "X" button on the program's window. In all of these options there is a chance of causing a memory leak, which renders some space in your computer's memory unusable until the next time you reboot the computer.
Compiling A Program
You must be using a full, retail copy of Visual BASIC. The Learning Edition will not compile to EXE
The process in which source code is converted into EXE is called "compiling", and is far more simplified in VB6 than a language like C++.
In order for your program to run on any given computer, that computer must have all of your program's "dependencies". All programs written in VB6 will require the Visual Basic 6 Runtime Library (msvbvm6.dll). Happily: Windows XP had the VB6 runtime library ever since first release, so if you make a VB6 program with no extra dependencies, it will work on Windows XP.
Prior versions of windows, however, did not come with the VB6 runtime preloaded, and will require it to be installed if it hasn't yet been installed.
If your program requires any extra DLL or OCX files in order to work, those are now dependencies of your program which you will need to supply to anyone you want to send your program to. For maximum portability it is a good idea to rely on functionality you implement in your own program. If you're lucky, you can opt for implementing the CTL source code file from an OCX into your program if the OCX is open-source and was written in VB6.
Getting into the source code
Right-click anywhere on the form called "Form1", and select "View code". Another way to accomplish the same thing is to double-click anywhere on the form.
You should now see the following:
Option Explicit Private Sub Form_Load() End Sub
This is the current source code behind this form. Your cursor is currently between "Private Sub Form_Load()" and "End Sub" because the object you double-clicked on was a "Form" and the default subroutine for the IDE to bring you to if there is nothing yet coded for that object is "Load()".
You can change which subroutine associated with "Form" you want to look at by clicking somewhere inside the "Form_Load" routine, then selecting one of the options inside the combo-box on the top right of the window you're in.
This function will get you spoiled, quick.
Setting project properties
Search through this dialog. Learn its options. Set the values inside.
This gives you a good understanding of the basics of the VB IDE. As you program and learn new things these tips will prove very helpful. If you have any other tips or questions please post them by clicking the Add Comment button below.