View Single Post
Unread 29 Dec 2004, 19:40   #21
JetLinus
Friendly geek of GD :-/
 
JetLinus's Avatar
 
Join Date: Nov 2000
Location: On my metal roid
Posts: 923
JetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud of
Arrow Re: text files and combo boxes in visual basic

Well, I'm not quite sure if SI's method would work, as I'm afraid you cannot use "dim" in a form module, but have to use "private" instead -- i.e. no public variables there.

I myself would work with modules (.bas-files) anyway. And do all the stuff from there. Have a Sub Main() where the project starts (Project, Properties, Startup Method, -> Sub Main). Then in this sub, you load and show all your forms etc.
To "pass" variables from Form to Form you'd use a global variable, declared in your module.
But all the important and non-form-specific stuff happens inside that module then anyway.


How you create multiple instances of a form I don't know, but I can guess:
Create and desing a form, let's say frmMain.

And then somewhere, call
Code:
Dim MyForms(1 to 100) as Form
Set MyForm(1) = New frmMain ' or maybe put the New in the line above...
MyForm(1).Show

'or try to this
Dim MyForms(1 to 100) as New frmMain
MyForm(1).Show
I'm sure the VB help will provide more info on this (see programming concepts).
__________________
[»] Entropy increases! :-/
JetLinus is offline   Reply With Quote