Results 1 to 3 of 3

Thread: closing a form at Form_Load

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    closing a form at Form_Load

    Umm I'm getting confused. I have to close a form at Form_Load event, but it doesnt work when I put the code in the load event
    I'm using Me.Close () .....

    And yes, dont tell me that it doesnt make sense to close a form when it's loading. It's in a If statement and it's suppose to close the form if blah blah blah happens
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    Addicted Member
    Join Date
    Nov 2000
    Location
    San Diego - California
    Posts
    251
    I think you cannot close the form on the onload event as the form is not officially loaded. So the answer is to close the form on the onactivated event. - This occurs after the onload.

    You can hide the form on the onload event and then if your condition is met in the activated event then you can show the form.

    Hope it helps.

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by BryanJ
    I think you cannot close the form on the onload event as the form is not officially loaded. So the answer is to close the form on the onactivated event. - This occurs after the onload.

    You can hide the form on the onload event and then if your condition is met in the activated event then you can show the form.

    Hope it helps.
    tnx a lot didnt think of that before
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

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