I am in the process of doing an exploratory porting an
application from Visual Basic 6.0 over to PowerBASIC 6.0.
I am also new to PowerBASIC, havng started using it only
about a month ago, but have been using Visual Basic since
it first came out many many moons ago. Anyway, one of the
Visual Basic aspects I have not been able to emulate after
several days of trying is the Form.Unload and Form.UnloadQuery
routines. For those of you who don't use VB, these routines
are where you place any code you want executed when a form
(dialog) is unloaded. If the form in question is the main
application form, that code will be executed no matter how
the program is terminated, be it by a controlled END statement
in the code or the user clicking the upper right X of the
application's window, hitting Alt-F4, or most importantly,
the operating system itself closing the application as it
might if the user tells Windows to restart. The main use,
and what I am using them for, is to place the cleanup code
that I want executed when the main application, which is a
TSR so its form is actually never visible, is terminated.
Anyway, I assume one can achieve this in PB using a callback on
the main dialog although on a hidden form (dialog) this
may not be the way to do it, but so far I don't seem to be
able to rig a callback up to do this correctly even with a
dialog that is visible.
Anyone out there know how to achieve the equivalent of a Visual
Basic UnLoad subroutine?
------------------
application from Visual Basic 6.0 over to PowerBASIC 6.0.
I am also new to PowerBASIC, havng started using it only
about a month ago, but have been using Visual Basic since
it first came out many many moons ago. Anyway, one of the
Visual Basic aspects I have not been able to emulate after
several days of trying is the Form.Unload and Form.UnloadQuery
routines. For those of you who don't use VB, these routines
are where you place any code you want executed when a form
(dialog) is unloaded. If the form in question is the main
application form, that code will be executed no matter how
the program is terminated, be it by a controlled END statement
in the code or the user clicking the upper right X of the
application's window, hitting Alt-F4, or most importantly,
the operating system itself closing the application as it
might if the user tells Windows to restart. The main use,
and what I am using them for, is to place the cleanup code
that I want executed when the main application, which is a
TSR so its form is actually never visible, is terminated.
Anyway, I assume one can achieve this in PB using a callback on
the main dialog although on a hidden form (dialog) this
may not be the way to do it, but so far I don't seem to be
able to rig a callback up to do this correctly even with a
dialog that is visible.
Anyone out there know how to achieve the equivalent of a Visual
Basic UnLoad subroutine?
------------------
Comment