Results 1 to 3 of 3

Thread: Forms - Showing vs. Loading

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2002
    Location
    CT
    Posts
    51

    Lightbulb Forms - Showing vs. Loading

    I thought I'd share something I just realized although I feel foolish for not understanding this earlier.

    When a form is loaded using the Load command, the Load Form event executes even though the user does not see the form on the screen. When a form is loaded using the Show method, the Load Form event executes and the user sees the form on the screen.

    When a previously loaded form is made visible with the Show method, the Load Form event does not re-execute.

    Anyone else have some pointers on the way forms work?

    BluesMatt

  2. #2
    Frenzied Member Ideas Man's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    1,718
    Yeah, that's why you use the

    VB Code:
    1. Unload Me

    statement when you've finished with a form, not only does it free the memory used, but it lets you re-execute the Form_Load code again
    Last edited by Ideas Man; Nov 10th, 2003 at 12:41 AM.

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974
    that is true, but there are other events (such as form_activate) that are run every time hte form is shown

    VB help (somewhere) has a list of all the events that occur to a form, and the order that they occur in. I think somebody posted it on this form a few weeks ago.

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