Visual Basic Banner Exchange
Click here to advertise your product to over 25,000 VB programmers

July 1997

Return to Article Index

Dale's WorkBench No:5
by Dale Shaw


Databases & VB & more ….

Over the past few months I have been prompted by many readers to discuss the relative merits of developing database applications in VB Vs Access. Now, I think Access is a great tool for end-user data access. It is magic for knocking up simple data entry stuff. When it comes to serious database work, however, my preferences are fairly clear (this aint Access Online!) but it is certainly time for a good, detailed discussion on the pros and cons…. Next month!

In the meantime, feel free to send me your opinions.

Well, it has been an interesting month … if bashing your head against brick walls can be described as interesting. Users are always coming up with requests for new features. Try this one:

"You have given us what we asked for: a number of free-form text boxes to type data into. We can scroll up and down but the boxes are too small. We can't read the data without endless scrolling. Can we make them bigger?"

Unfortunately, the users were all using standard VGA screens and the forms were already quite crowded so making the boxes any bigger would have been difficult. Then one of the users requesting the change said the word zoom and suddenly the solution was obvious! What we did was allow users to double-click the text box they were interesting in and it would zoom out! The code was easy enough. I created a Public variable called ZoomText that was used to temporarily store the text to be displayed and to return changes. The ZoomOut procedure shown below grabs the text from the current text field and displays it:

To complete the job all that was needed was a frmZoom (with one text box and OK and Cancel buttons) and some code to activate ZoomOut. To the double-click event of each 'zoom-able' field I added:

….the ME parameter passing a pointer to this form, allowing ZoomOut to be used with a number of forms.

I then added a MouseMove event so that the window caption changed to show the user when they are moving to a 'zoom-able' field.

I added similar code to the form's MouseMove event to put the form caption back to it's 'normal' state. My ShowZoom sub is a little bit more complex than it need be but the aim is to save lots of un-necessary screen updates as the mouse moves around the screen.

The point of all of this is NOT the solution involved. Creating a simple, re-usable ZoomOut routine didn't take long but BOY are the users impressed. The nett result is that they got precisely what they needed without me having to redesign a stack of screens. Sometimes a simple solution is by far the best.


About the Author

Copyright 1995-1997 NETSOL Internet Solutions Group. All rights reserved.