Creating New the Project in VB 6

First thing to do is to create a Directory where you will store all your VB Projects. Call it VBApps, for example. Then start VB. The first screen will ask whether you want to open a new project or an existing one – it’s obviously a new one and it will be a Standard EXE. Then, maximize all the windows (it’s easier to work with – some of the examples in the tutorial had to be reduced for the sake of the presentation). Now, save your project. It will first ask you to save the form – call it Score.frm – and then the Project – call it Scorebrd.vbp. From now on, do File–>Save Project very, very frequently.

Before you start to build-up the form, it will make it easier if you change the color of the form. Otherwise you will be working with grey controls on a grey background. To change the color, just click anywhere on the form, go to the properties window, find the property called BackColor and change it to the standard Window background (teal) or to any color you want in the palette.

In our first example we will need 6 labels and 2 command buttons. Each one of these objects that you put on a Form is called a control. To get a control you go to the Toolbox, click on the control you want, come back to the Form and click and drag the control to the size and position you want. Position the controls somewhat like in the diagram below.

IMPORTANT NOTE: If this is your first experience with VB, don’t be afraid to experiment. This is hands-on stuff! Remember that VB is a Microsoft product, therefore it works with the standard Windows interface. All the functions you know from MS-Office work the same way here: Copy, Cut, Paste, (Ctrl)+(Click), (Shift)+(Click), drag the mouse over a group of controls to select them all, etc. The Undo button is a nice one to keep handy – when you modify a control you can always Undo the change – remember this when you get to the part about aligning the controls, making them all the same size and so on. That part can get tricky. If you accidentally end up in the Code window while palying around, go down a few paragraphs and you will see how to get back to the Form. At this point the worst that can happen is that your Form will get all messed up. So what! You can just scrap it and start over again, but you will have learned something.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: