Results 1 to 7 of 7

Thread: Loading forms

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    9

    Post

    I have a few mdichilds in a MDI form. When I run my app the mdi form loads quickly. But in the mdichild forms I have a lot of controlls so they take a while to load the first time.

    Is there any why to load these bigger mdichilds when the mdi form loads. Then I'll divide the loading time and my app will feel faster.

  2. #2
    Lively Member
    Join Date
    Jan 2000
    Location
    Thessaloniki ,Greece
    Posts
    100

    Post

    Hi...
    You can write in Mdiform_load

    Private Sub MdiForm_Load()
    Load FormName
    End Sub

    And to see the form type

    Private Sub Command1_click()
    FormName Show
    End Sub

    I hope that is help you

    [This message has been edited by Civil78 (edited 01-23-2000).]

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    9

    Post

    But Load myform made my form visible. So I had to hide it again and then I got a blink.

  4. #4
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923

    Post

    All MDI Childs are loaded automatically when the MDI parent form is loaded...

    ------------------
    - Chris
    [email protected]
    If it ain't broke - don't fix it

  5. #5
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Cleveland, Ohio
    Posts
    263

    Post

    chrisjk is incorrect, the only mdi childs shown in startup is if a mdichild is set to load first, so the mdiparent is automatically loaded before that.

    Civil78 should be right, just put whatever mdichilds you want to be loaded in the mdiparent's load event (Load MDIChildName). The should not show from this, only load.

  6. #6

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    9

    Post

    I must be stupid because if I create a new project with only a MDI form and a MDI child. I set the MDI form to startup form and then I write:

    Load Form1 ' Which is the MDI child

    Now Form1 is visible. What can I do if I want to load a form without showing it?

  7. #7
    Member
    Join Date
    Nov 1999
    Location
    Perth, WA
    Posts
    35

    Post

    Klas, using form1.load in the beginning will load form1 into memory but not show it, using form1.show will display the form.

    if it isnt loaded form1.show will load it when necessary

    also form1.unload takes it out of memory and form1.hide takes it out of dispaly, unload will also hide the form

    these can be called from the child forms or parent forms i think, if not put it in the mdiparent module and call it but thats harder to think about

    hope its cleared up

    btw, if anyone has it i need filecopy source code

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