Home -> Programming -> Planning -> Program Creation Process

Program Creation Process

The conceptual process I recommend is straightforward. It describes both an overview of the process, and a description of the actions you need to take to to create your program.

  1. Design your form.
    Use paper and pencil draw out what you want your form to look like. Place all the controls you think you will need on the form. If necessary you can always add more later. To do this well, it helps to have some knowledge of design principles and program interfaces. The basics of designing a layout and program interface are discussed here. You will also need a knowledge of the basic controls available in Visual BASIC. A summary of the basic controls is found here..
  2. Create your form.
    1. Open up VB Express and create a new project. You can open VB in one of several ways depending on the installation setup which was performed. Note this assumes you are using your personal computer and not one set up in a lab. Lab computers necessarily have a more complex file structure and the location of the Visual Basic program will be different. You should be able to launch the program using one of these methods.
      • If there is a VB Icon on your desktop, double-click the icon. This will launch the VB editor.
      • Go to the Windows Start menu; navigate to Programs. If the program has been added to your Start menu it could be just inside the Programs folder or it could be in Microsoft Visual Studio folder. Find the VB Program menu item and click to select and launch the VB editor.
      • Open a window and navigate to the location of your VB program. In succession open the following: C Drive, Programs, Microsoft Visual Studio, IDE. Double-click the vbexpress.exe icon to launch the VB editor.
    2. From the File menu select New Project. This will bring up a dialog box which will allow you to name your project and save it to a place where you can find it later. (You should be familiar with this process from using other programs.)
      Note this process just completed has not actually saved anything! When saving your project do so by selecting Save All from the file menu or by using the keyboard shortcut ctrl-shift-s. VB projects consist of several files in which various pieces of information are stored so you should always save your project by using the Save All command. Save your project now!
    3. Using the toolbar on the left side of the screen, create the layout you designed in step one above by selecting the control in the toolbox and clicking on the form. Move the control into its desired location and size it appropriately. Use the alignment commands in the menus rather than trying to eyeball things.
  3. Set the initial properties for your form and each control on it.
    You need to set all necessary initial properties. An partial list of the most important properties of the basic controls is shown here. For each element of the layout you created, set the properties of the control. At a minimum you must set the Name property for each control you created. (See Controls table for key properties which need to be set for each type of control.)
  4. Write your program code.
    Using the planning document you created, write the code for each event, action by action until you are done. Start with the simplest events and run the program after you finish coding each event. This helps you find any errors and fix any errors before too many errors accumulate. The more errors there are in your program at any particular time, the harder it becomes to find and fix them. So run your partially completed program frequently and fix errors before moving on to the next action.

Important!

Since this site caters primarily to introductory programming in Visual BASIC, we will be referring specifically to the things necessary for you to learn to create VB programs. It is helpful and necessary to plan before we start coding. That is not to say that we have to be slavish about it, but a little planning can not only save a lot of time, but will help you keep track of what you need to do to make your program effective.

Before you can start planning the form, you need to know:

The following table provides this basic information. Since these three pieces of information are necessary in order to plan each and every program you write, you need to learn and remember them rather than looking it up each time. It is quite acceptable to look up some of the details of their properties, what they do and how to use them, but you need to learn the basic controls, what they are used for, and what the main event they trigger by heart. Since you will use it in every program you create, you should have no difficulty remembering it after you have created a few programs. This table is a summary of the most important basic controls. It is intended to introduce the essential information you need to know to understand the purpose of each control.