Linker IT Software
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
VB6 Form UnloadMode (Read 4845 times)
Gerrit-Jan Linker
YaBB Administrator

Posts: 75
VB6 Form UnloadMode
10.03.10 at 16:06:17
VB6 Form UnloadMode
It is possible to cancel the unloading of a form (e.g. when the user presses the X control button in the top right of the window). The QueryUnload event of the form fires. You can set the Cancel parameter to true if you want the unloading to be cancelled. However depending on the UnloadMode you may wish to do this. For example you could prevent your program from being closed from the Talk manager.
Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)

End Sub

UnloadMode can have the following values:
    0   The user has chosen the Close command from the Control-menu box on the form.
    1   The Unload method has been invoked from code.
    2   The current Windows-environment session is ending.
    3   The Microsoft Windows Task Manager is closing the application.
    4   An MDI child form is closing because the MDI form is closing.
Back to top

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1