Getting Started in VB: Saving and Editing MS VB 6.0 frm files
Background: Forms and Projects
The word FORM is
VB's way of referring to a thing that will become a window in your
program. A form can have buttons, pictures, text, etc. For example,
here's a picture of a form that contains a label, a picture box, a
command button, and a text box:

Even though this form has lots of things on it, it's still just a
single form. However, some programs have lots of windows that open up
when you run them (and so use lots of forms). The programs we're going
to write this semester will ALWAYS only have one form.
When you write programs with multiple forms, you need to keep track of
those forms as a group. You do this by creating a PROJECT. Think
of a project as a folder that keeps track of a group of forms that go
together.
Since each of our programs will only have one form, it's silly for us
to make a project for each program. So we're going to skip that and
save some space on our hard drives / flash drives / etc. But VB is
going to try desperately to make us create projects. This document
explains how to just use forms without projects.
Creating a new program from scratch
- Start MS Visual Basic 6.0
- When you see the "New Project" Dialog box, make sure that the
"New" tab is selected
- Click on Standard EXE
- Click on Open
Now you've got a single form that you can work with.
Saving your program to your hard drive
VB does NOT automatically save your program. In fact, if VB crashes
while you're in the middle of writing a program, all of your work may
be lost. You should save often.
VB wants us to save your form and your project. But we know that we
don't have to save the project, since we're only using one form in it.
So here's how you save just the form:
- Do NOT
click on the save icon that looks like a floppy disk at the
top of the VB window, instead ...
- Go to the File menu and select Save
Form1 (if you have renamed your form, it will say "save <your
form name> ") - do NOT
select save project
- Navigate to the appropriate folder where you want to save your
program. Note that VB will try and force you to save it in some VB
folder where you'll never find it again. Be sure to move it to your H
drive if you're at school.
You will have saved a file of type frm -- a visual basic form
Saving your program to your flash drive
First, follow the steps in "Saving your program to your hard drive"
above. Then, use "my computer" to copy the frm file from your hard
drive to your flash drive. Do not try to save directly from VB to your
flash drive!!
Reopening a program you have already started working on to run it
again or work on it some more
- If you were working on something else, make sure you save it
using the instructions above on "saving your program to your hard drive"
- If the item you wish to open is on a flash drive, first copy it
to your hard drive (H drive if you're at school) using "my computer"
- Go to the file menu and select "open project" (yes, you have to
say you want to open a project, don't panic)
- If it asks you if you want to save your changes to project 1,
just say no (you already saved your form
in step one of these instructions, right?
- Go to the "files of type" drop down menu, and select "all files
(*.*)"
- Navigate to where you saved your old file (on your H drive?)
- Double click on the frm file that you want to work on.
- In the project window (probably near the top on the right hand side of your VB window), click on the plus sign next to the word
"Forms"
- Double click on the form that appears underneath (probably called
"Form 1")