Results 1 to 7 of 7

Thread: Unload_Form

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 1999
    Posts
    184

    Angry

    I need the program I have made to do
    a few things nomatter what before
    it closes.

    When I Press Ctrl+Break the program
    pauses and then I press the stop
    button and the program doesnt run
    through that ending code.

    How can I still run that code??
    Evan Duffield --------
    --- [email protected]
    - -
    VB6 - Learning Edition
    - -


  2. #2
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Nitro
    Posts
    633

    I am not quite sure what you want to do.

    Have you look at On Error Goto

  3. #3
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    Question ?

    Say what? Not sure what you are referencing
    If you are referring to the stop button in the VB pgm then nothing runs..that button says STOP..END

    If you have created your stop button then put your code ahead of your unload.

    Commnand Button_Click
    Msgbox "Help, I've fallen and I can't get up."
    unload me
    set form1 = nothing
    end sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  4. #4
    Junior Member
    Join Date
    Dec 1999
    Posts
    25

    Cool program

    try pressing F8 when u are about ready to run your program. this will take u step by step through every line of code. this is a great way to debug any program.

    another great way to debug programs is to use the "run to..." command. put your cursor where u want to start checking your code when it gets to that point of the program.

    this will let u see exactly what lines are actually being executed and which ones are not. breakpoints will also help u. please inform me if this is of any help.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Nov 1999
    Posts
    184

    Unhappy Wrong Information

    OK,

    I know how to debug the stupid thing.
    I want to run through a line of code
    no matter what happened. If I press
    the stop button the program WILL NOT
    run through the terminate code.

    I need it too~!



    [Edited by Dayo312 on 06-11-2000 at 02:10 AM]
    Evan Duffield --------
    --- [email protected]
    - -
    VB6 - Learning Edition
    - -


  6. #6
    Member
    Join Date
    May 2000
    Posts
    63
    Try the QueryUnload event of the form. You can capture how the form was closed and take appropriate action from there

  7. #7
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    The stop button in vb functions the same as the End command.
    Code execution is stopped immediate, and all objects are unloaded.
    If you want the code in the QueryUnload and Unload events to be executed, don't use the End command, and don't press the stop button in the IDE.

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