M
Mark
I have an application that consists of a main menu and
multiple forms launched from that main menu. Currently,
all the forms are launched as separate threads with their
own Windows message loop (using Application.Run). This
allows the forms to communicate with each other and with
the main menu (for statusing). The forms can also access
common data in static variables. Another reason for
having threads is that they launch faster and are more
lightweight than a process. This works fine except
occasionally, one of the forms goes busy and gets locked
up and then when the user clicks on the X to close the
form, Windows pops up the standard "The application is
not responding. Do you want to close it". When the user
does so, the entire application closes, not just that
form. I am trying to find out if I can intercept that
application kill and direct it to a form of mine that
would let the user kill the one thread in the application
that is causing problems. If I had to I guess I could
launch my forms as processes, but then I would have to
provide a mechanism for them to communicate with each
other and with the common data.
Thanks.
multiple forms launched from that main menu. Currently,
all the forms are launched as separate threads with their
own Windows message loop (using Application.Run). This
allows the forms to communicate with each other and with
the main menu (for statusing). The forms can also access
common data in static variables. Another reason for
having threads is that they launch faster and are more
lightweight than a process. This works fine except
occasionally, one of the forms goes busy and gets locked
up and then when the user clicks on the X to close the
form, Windows pops up the standard "The application is
not responding. Do you want to close it". When the user
does so, the entire application closes, not just that
form. I am trying to find out if I can intercept that
application kill and direct it to a form of mine that
would let the user kill the one thread in the application
that is causing problems. If I had to I guess I could
launch my forms as processes, but then I would have to
provide a mechanism for them to communicate with each
other and with the common data.
Thanks.