closing & tidying up

Hi All,

I've been a software engineer for a while now but I am new to VB and windows programming. My question is:

How do I override the default action of the window closing (pressing the little 'x' in the top RHS of the window), so that I can make sure everything is the way I want it and close the app myself?

I have a few VB books, and I've looked around on the web a bit for the answer but I can't sem to find it. Maybe I'm looking in the wrong places ;(.

Thanks in advance

Chris

Comments

  • the sub Form_Unload()is triggered just before the actual closing of the program. With Form_QueryUnload(Cancel as Integer) the OS sends the close message. In this sub you can override it by giving the Cancel integer some value, 1.

    ! Dunno if i typed queryunload correct, see the procedures for a form to get the correct !


    : Hi All,
    :
    : I've been a software engineer for a while now but I am new to VB and windows programming. My question is:
    :
    : How do I override the default action of the window closing (pressing the little 'x' in the top RHS of the window), so that I can make sure everything is the way I want it and close the app myself?
    :
    : I have a few VB books, and I've looked around on the web a bit for the answer but I can't sem to find it. Maybe I'm looking in the wrong places ;(.
    :
    : Thanks in advance
    :
    : Chris
    :

    [HR]
    [CODE]
    Wot tinkst no wol wr fn my?
    Do mast dy in kear dyn stomme bek tigt hlde.
    Oars mat ik mem Jelsma es op dy wstjoere!
    [/CODE]
    [HR]

  • Great!

    Thanks

    Chris


    : the sub Form_Unload()is triggered just before the actual closing of the program. With Form_QueryUnload(Cancel as Integer) the OS sends the close message. In this sub you can override it by giving the Cancel integer some value, 1.
    :
    : ! Dunno if i typed queryunload correct, see the procedures for a form to get the correct !
    :
    :
    : : Hi All,
    : :
    : : I've been a software engineer for a while now but I am new to VB and windows programming. My question is:
    : :
    : : How do I override the default action of the window closing (pressing the little 'x' in the top RHS of the window), so that I can make sure everything is the way I want it and close the app myself?
    : :
    : : I have a few VB books, and I've looked around on the web a bit for the answer but I can't sem to find it. Maybe I'm looking in the wrong places ;(.
    : :
    : : Thanks in advance
    : :
    : : Chris
    : :
    :
    : [HR]
    : [CODE]
    : Wot tinkst no wol wr fn my?
    : Do mast dy in kear dyn stomme bek tigt hlde.
    : Oars mat ik mem Jelsma es op dy wstjoere!
    : [/CODE]
    : [HR]
    :
    :

  • Yo man! sign my QuesTbook!!

    : Great!
    :
    : Thanks
    :
    : Chris
    :
    :
    : : the sub Form_Unload()is triggered just before the actual closing of the program. With Form_QueryUnload(Cancel as Integer) the OS sends the close message. In this sub you can override it by giving the Cancel integer some value, 1.
    : :
    : : ! Dunno if i typed queryunload correct, see the procedures for a form to get the correct !
    : :
    : :
    : : : Hi All,
    : : :
    : : : I've been a software engineer for a while now but I am new to VB and windows programming. My question is:
    : : :
    : : : How do I override the default action of the window closing (pressing the little 'x' in the top RHS of the window), so that I can make sure everything is the way I want it and close the app myself?
    : : :
    : : : I have a few VB books, and I've looked around on the web a bit for the answer but I can't sem to find it. Maybe I'm looking in the wrong places ;(.
    : : :
    : : : Thanks in advance
    : : :
    : : : Chris
    : : :
    : :
    : : [HR]
    : : [CODE]
    : : Wot tinkst no wol wr fn my?
    : : Do mast dy in kear dyn stomme bek tigt hlde.
    : : Oars mat ik mem Jelsma es op dy wstjoere!
    : : [/CODE]
    : : [HR]
    : :
    : :
    :
    :

    [HR]
    [CODE]
    Wot tinkst no wol wr fn my?
    Do mast dy in kear dyn stomme bek tigt hlde.
    Oars mat ik mem Jelsma es op dy wstjoere!
    [/CODE]
    [HR]

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories