right way to call a form?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: MP (nospam_at_Thanks.com)
Date: 11/16/04


Date: Tue, 16 Nov 2004 01:20:12 GMT

Hi all,
warning...dumb beginner question ahead!
(I leave it to you to decide if its' the beginner or the question thats
dumb)
:-)

I've written a bit of functionality in a std module.
It reads text files and applies a specialized parsing action on the text to
divide into separate pieces, and then saves each piece as a separate text
file.
Now I've got that almost working, I decided to add a form as ui with a
button for selection of the textfile to split up, and a listbox to display
parsing results.

part of my question is, what is the best way for a module and form to work
together? - or should i put everything in the form and not use modules
I think my options are:
option 1: copy/ paste all the module stuff into the form and ditch the std
modules all together. then make the startup object be the form.

option 2: keep the startup object as sub main which i've been using while
debuging/writing to call the sub that does the real work. and have the
working sub call the form in order to use the command buttons for selecting
files and viewing the results.

question part two....
the app uses several toolbox functions i've written over the years and have
stored in classes.
but in many cases the class, eg. clsStrings has lots of functions relating
to string manipulation and maybe only one or two are used in this routine.
Is it wasteful to create a class to use one or two functions only?
Should I just copy/paste the actual function from the class to the app and
dispose of the class or should i continue to use the toolbox utils class as
is?

I'd appreciate any pointers, opinions, or even hilarious laughter!
:-)
Tia
Mark


Quantcast