Results 1 to 5 of 5

Thread: Why would they want to do it this way?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2001
    Posts
    74

    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

  2. #2
    Fanatic Member rudvs2's Avatar
    Join Date
    Mar 2001
    Location
    NZ
    Posts
    935
    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)

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2001
    Posts
    74
    aaaaaaaaaaahh... that makes sense indeed..

    thank you



    hendra wijaya

  4. #4
    Megatron
    Guest
    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.

  5. #5
    Kenny_Dee
    Guest

    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
  •  



Click Here to Expand Forum to Full Width