Visual Programming

  Visual Basic Tutorial

File Handling - Form Design Ideas

Objectives

This guide will help you to: -  

  • with ideas on designing a form to display records.

Introduction

Ways of Viewing Records in a Form


Introduction

You should have worked through the first two file handling tutorials before attempting this one. 

  • The first tutorial showed you how to create data files and store data into them. 

  • The second file handling tutorial showed you how to read from data files. 

This tutorial give you ideas on how to display records in a form in a user-friendly way.


Ways of Viewing Records in a Form

In the previous file handling tutorial we ended up with a form that allowed a user to read data from a data file.  The problem with the form (shown below) is that it does NOT allow a user to choose a particular record to view.

 

The user has to start at the first record and look through the rest one at a time in sequence.

 

This is not very user friendly. 

 

What if you have a lot of records and want to view say the 20th one?

Perhaps a form like the one below would be more user friendly.

 

This form allows a user to browse back and forth viewing different records.

 

You can download my record.txt file and form (including the code) to try it out.

 

There is quite a lot of code in this one so it may appear difficult.

Or perhaps a form like this would be just as suitable.

 

This form allow a user to choose the record to display using a drop-down combo box.

 

You can download my record.txt file and form (including the code) to try it out.

 

There is not so much code in this one.

Here is one last possibility.

 

This form allow a user to choose the record to display using a list box.

 

This is similar to the combo box form.

 

You can download my record.txt file and form (including the code) to try it out.

 

There is not so much code in this one either.

We can see that there are many different form designs to choose from.  The last three forms are much more user friendly than the first one. 

The coding to make these forms work is quite difficult for your level.  If you really want to use something similar in your own assignment I suggest you choose which type of file-handling form you like from the three shown above and download my code for it.

Study the code and when you feel you understand it, try to change it for your own file-handling form in your assignment.


Fini
 

 

 

   

  Unit Information

Assessment

Syllabus

Scheme of Work

Notes &Tutorials

Assignments

Quizzes

Books & Things

Links

ADR 2002