Define the form to load at run time... 
Author Message
 Define the form to load at run time...

Would appreciate any ideas...

Depending on the menu option selected by the user a different form should be
loaded. Is there a way to define the form to be loaded at run time. (I keep
adding new forms and I don't want to use a hardcoded SELECT statement).
What I'm looking for is more or less:

Dim frm as Form

Set frm= ??? (depending on the menu option)

Thanks



Sun, 20 Oct 2002 03:00:00 GMT  
 Define the form to load at run time...

Hi

I already did that on different levels, but I never found information
on how to 'Set Form = New Form1' !

Depending on the type of application (MDI/SDI), there are
different ways to accomplish this.

SDI Forms could be stored in separate .exe files and shelled
when needed, or write a wrapper class for the form and use
CreateObject("yourformwrapper").

For MDI applications, I write a MDI framework (MDI form and a
single MDI child form). The MDI child form then loads a control
at run-time.

Hope this helps

Alex


Quote:
>Would appreciate any ideas...

>Depending on the menu option selected by the user a different form should
be
>loaded. Is there a way to define the form to be loaded at run time. (I keep
>adding new forms and I don't want to use a hardcoded SELECT statement).
>What I'm looking for is more or less:

>Dim frm as Form

>Set frm= ??? (depending on the menu option)

>Thanks



Sun, 20 Oct 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Changing Form's BorderStyle property at run time but before form is loaded

2. Run-Time form loading - form name retrieved from database

3. run-time Error 713 - Application Defined or Object Defined

4. run-time error '713': Application-defined or object-defined error

5. Loading a form at run-time

6. Loading a form at run-time

7. Help: Loading forms at run-time.

8. Run-time error '31037': Error load form file

9. Load form at Run time

10. Adding (loading) a Form at Run-Time ?

11. Loading a pre-existing form at run-time ?

12. Seting App path to the ADOCD control before at run-time form load

 

 
Powered by phpBB® Forum Software