David Heffernan 2364 Posted 6 hours ago 1 hour ago, dormky said: Then please explain ? I delphi, I write to a variable that is then monitored to close the form. In Window, I call a function. Those two things are completely different. Imagine if you would read documentation. Like that for EndDialog. And imagine if the documentation for EndDialog said this: EndDialog does not destroy the dialog box immediately. Instead, it sets a flag and allows the dialog box procedure to return control to the system. The system checks the flag before attempting to retrieve the next message from the application queue. If the flag is set, the system ends the message loop, destroys the dialog box, and uses the value in nResult as the return value from the function that created the dialog box. So yeah, it's exactly the same as the Delphi mechanism. Because that's how modal dialog are implemented in Windows. Share this post Link to post
dummzeuch 1541 Posted 4 hours ago 2 hours ago, dormky said: There's a reason Delphi is a dead language Not that again! Just remove the f*ck*** call to Close and be done with it. 1 Share this post Link to post
Brandon Staggs 319 Posted 4 hours ago (edited) 16 minutes ago, dummzeuch said: Not that again! Just remove the f*ck*** call to Close and be done with it. But, the language is dead because he doesn't have to call Close. If he removes the call to Close and suddenly everything works the way it was designed to, then the language may come back to life. Sounds dangerous. Edited 4 hours ago by Brandon Staggs Share this post Link to post