Visual basic open a project in design view where you can modify project properties like project name and description, version information, and other similar attributes. Managing VB 6 projects is easier than you may think.
The project tab in the visual basic standard toolbar contains project properties which allow us to change settings related to a visual basic project.
You can also add predefined forms, menus, and modules to your project using the visual component manager. A menu in the visual component manager can be reused in many different forms. Not an only menu, but you can add other types of components like class, modules, media forms, reports, documents, etc.
Naming a Visual Basic 6 Project
To name a visual basic project you must:
- Specify a project name when you save the project file. Every project creates a .vbp file and requires user-specified name before you save it to a disk.
- Specify a project name from project properties under the project tab.
We want to set the project name as MyFirstVBProgram. To set this name, go to project tab > select project properties > under general tab > project name, type the name for your project and a description under project description section.
Project Version Version Information
Larger vb projects need to keep version numbers and version information such as company name, software product name, license information, copyright information, legal trademarks, comments, etc.
You can set this information from project properties > make tab. The two options related to the project are:
- Version number
- Version description.
You can enter the project version number and other required details under version description. The project icon is the icon set for the startup form. Jump to next section for information on startup form.
After you convert your project into an EXE file (File menu > make MyFirstVBProgram.exe), right-click the file and go to properties > details tab. You can see the version information related to the project.
Startup Form for the Project
The startup form is the first form loaded in when the visual basic starts. You can decide the form or the object to load at startup in visual basic.
To set this value, go to project properties, under general tab> select the startup object from the drop-down and click ok.
In the figure above, the startup object is Form1 and loaded first.
Adding Predefined Components to a Project Form
Managing visual basic 6 projects needs two types of components frequently.
- Predefined Components such as menu, modules, etc
- ActiveX and Insertable objects such as MS Excel, MS Word, etc.
The predefined menu is added using visual basic component manager. If you have not installed the component manager, use the add-in tab to load it.
Under add-ins > click add-in manager and select the visual component manager 6.0 to install. If already installed, go to standard toolbar.
You can add the components by clicking on the visual component manager from the standard toolbar icon. This will open the window for the visual component manager.
Predefined Menu for Form
When the window for component manager is open, click Visual basic folder > open Templates folder and select the folder for predefined component you want to add to vb project.
For example, you want to add a File menu to the project form. Then select Menu folder under Templates in the visual component manager.
If nothing is found, create a new component by clicking on the “publish a new component” option on the top and finished the new component wizard.
Now you can select a new reusable component for your project.
Add ActiveX Controls
There are special controls called ActiveX that require that visual basic loads the necessary files. For example, you can connect SQL database to vb form using data grid control.
To enable the activex controls, go to project > components and select the components you want to install.
The tab insertable objects, let VB programmers insert MS Excel, MS Word, and other similar objects.
Visual Basic 6.0 Programming by Examples Kindle Edition
Visual Basic is one of the easiest to learn computer programming language.
Yes, it is obsolete, but all MS Office products include VBA (Visual Basic for Application) and if you learn VB, you will know VBA!
In my tutorial, I used VB 6 to explain step by step how to create a simple Visual Basic Application and a relatively complex one (a Patient Management system) that is using a database. A patient Management application source code is explained in detail.
You will learn how to design and create a database in MS Access and how to create tables and queries.
The book includes a sample application that shows how to use Windows API function.
You will learn how to convert VB program that can be run only in Visual Basic development environment to a distributable application that can be installed on any client computer.
For illustration, I included 128 screenshot images and links to a video.
You will be able to download from my website complete source code for 7 Visual Basic projects including a Password Keeper, a Patient Management and a Billing Management application.
Get Your Copy Today!