|
-
Jul 25th, 2001, 11:59 PM
#1
Thread Starter
Lively Member
Why would they want to do it this way?
Hi all,
I am trying to write a program in VB in a more professinoal way, instead of the way I'm doing it. Any programmer who sees my program will probably will have the loudes lough in his life.
Anyway, I used the Application Wizard in VB 6.0... One thing that I found interesting is that the following code
Set fMainForm = New frmMain
Load fMainForm
You see... there is this frmMain already design..
why can't they just use the following code instead
frmMain.show
I think the main reason of using "load" is because there is a splash screen... So the mainForm is hidden while loaded, so only the splash screen is shown.
But why the creating a new form object ??
Regards
hendra wijaya
-
Jul 26th, 2001, 12:03 AM
#2
Fanatic Member
by creating creating an object to contain the form, it gives you the ability to completly destroy the form If yuo are using a module and have other forms still open or have no forms open and still have code executing
it also will allow you to handle multiple instances of the form a lot easier.
(at least this is only my humble understanding of it)
-
Jul 26th, 2001, 07:26 AM
#3
Thread Starter
Lively Member
aaaaaaaaaaahh... that makes sense indeed..
thank you
hendra wijaya
-
Jul 26th, 2001, 08:58 AM
#4
Think of it this way. When designing an MDI Child form, you can have a "template" form, and loading new templates (with your method shown above) each time the user requests a new document.
-
Jul 26th, 2001, 09:03 AM
#5
loading a form
they are correct. Using a load form will load the form up in the background. When you show the form it will show up right away.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|