I've got a main form and a subform. My main form is responsible for creating and destroying the subform. In an event handler (a ButtonClick) of the subform there's a loop like
for i := 0 to whatever do
Application.ProcessMessages; // To refresh some controls
DoMoreStuff; // (*)
I want the user to be able to destroy the subfrom via main form while the subform is in that loop. After the destructor has finished the program continues at (*) which leads to a crash (because the resources accessed in DoMoreStuff are gone).
I thought about not to close the subform in the main form but start another thread that monitors the loop and closes the subform from this thread but that's breaking a fly on the wheel...
Any hints? Thanks in advance!
- This article will help user in how to convert their numeric value become words.
How to use
1. You can copy this code in your Unit as function
2. than you can perform your function by type this code
Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview. I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online)
The email signat…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"!
Step 1: Open a new google tab
Step 2: Go to the left hand upper corn…