Form Loading Question

  • Thread starter Thread starter Bart Lynn
  • Start date Start date
B

Bart Lynn

Is it possible, to have 3 forms, (Form1, Form2 and Form3) that based on user
input, loads the select form as a particular varaible name?

Here is what I mean

I want the loaded form to be referenced as frmOpdisplay, independent of
which form is loaded.

Dim frmOpdisplay as new ("selected form")
frmOpdisplay.Showdialog

The reason is, I have several procedures that are relative to all the forms
and I do not want to have multiple instances of the code in each form. I am
putting them in a Module, that references for example,
frmOpdisplay.textBox1.

Any ideas?

Bart
 
* "Bart Lynn said:
Is it possible, to have 3 forms, (Form1, Form2 and Form3) that based on user
input, loads the select form as a particular varaible name?

Here is what I mean

I want the loaded form to be referenced as frmOpdisplay, independent of
which form is loaded.

Dim frmOpdisplay as new ("selected form")
frmOpdisplay.Showdialog

The reason is, I have several procedures that are relative to all the forms
and I do not want to have multiple instances of the code in each form. I am
putting them in a Module, that references for example,
frmOpdisplay.textBox1.

You may want to add all your form instances to a globally available
'Hashtable', for example.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
 
Back
Top