First thanks for the valuable input I got previously on
implementing some kind of menu via sub main.
I am having some trouble with dealing with multiple forms.
I have been instructed to stop using the common dialog box
because it lets users do too much. So, I have had my first
experience with the directory, folder, and file list boxes.
The first thing is it seems to work ok for the C: drive, but when
I select another drive my folder and file boxes aren't reacting
properly. This is probably just because I wrote bad code to handle
it all, and actually I will be forcing the drives anyway so that
doesn't matter.
Anyway, what I am trying to do is take a one form project and
implement a sub main to call a module to select a file which goes
into a global variable, then show the original form/program. Then,
when it's done, pick back up in the sub main to see if they want to
re-run the program/form.
I used a global variable to hold the filename, and can get it to
almost work, but I run into problems trying to figure out when to use
form.show, load form, etc. And, the differences between activate,
load, initialize events. Is there a standard approach to this? I
have used the project wizard and looked at a multiple form project in
it, and have two other books which address it, but they are all a
little different and don't seem to work for me.
I probably didn't do a very good job explaining it so let me
break it down, here's what I want to do.
run program
sub main executes
-calls module to get filename frmSelectFile.show vbmodal
-- that module gets filename (global variable) and unloads
-frmMain executes (frmMain.show vbmodal)
-- when it is done and unloads then sub main takes over again
-"Want to run again?" if so repeat, otherwise end
The filenames can be changed within the main program/form in case
user initially selects wrong file so I guess instead of using a
separate module I should just put the code for selecting the file in
the main form anyway.
I should note that I am trying to get away from using the file system
object which can be added to the project because that means I would
have to install it on all the systems on the network and I had such a
hard time getting them to work in the first place I am trying to only
use resources that have already been installed from my previous
applications. My company will not spend the money on another
deployment program so I am stuck.
As for this current project, I think I can accomplish what I want a
different way, but I need to write data entry applications which will
handle multiple pages/forms in the future so this is something I am
going to have to learn anyway. I think if I just hide the forms and
show them when appropriate I can get by but obviously I don't have a
clue lol.
While I am thinking of it, is it possible to just make one BIG form
that is bigger than the screen? Will it automatically scroll ? This
might be better than multiple pages/forms.
I know your time is valuable and any feedback is appreciated.
Chris
'// =======================================================
Rules : http://ReliableAnswers.com/List/Rules.asp
Home : http://groups.yahoo.com/group/vbHelp/
=======================================================
Post : [email protected]
Join : [EMAIL PROTECTED]
Leave : [EMAIL PROTECTED]
'// =======================================================
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/vbhelp/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/