Delphi Pages Forums

Delphi Pages Forums (http://www.delphipages.com/forum/index.php)
-   Apps (http://www.delphipages.com/forum/forumdisplay.php?f=8)
-   -   How to force terminate a delphi application? (http://www.delphipages.com/forum/showthread.php?t=208891)

axxa 10-27-2010 10:37 AM

How to force terminate a delphi application?
 
Anybody knows how to force terminate a delphi application?

I use D5 with QReport 3.0.5 and this version of QuickReport has a bug when useing QRDBRichText. When u try to close the apllication, after preview the report, an exception error message raise.
Because of this , I need to force terminate the apllication.

I try:
- TerminateProcess(GetWindowLong(WindowHandle, GWL_HINSTANCE), 0);
- Application.Terminate;
- PostMessage(Handle, WM_CLOSE, 0, 0);

nothing works... :mad:
How can I do?! I need to kill my application but I don't know how.. :rolleyes:
Thank you very much for any idea...

HarryCL2 10-30-2010 12:55 AM

Quote:

Originally Posted by axxa (Post 213247)
an exception error message raise.

Try
Except
End;

Trap the exception. You don't need to even check the exception, just stop it from locking up QR.

Forcing the application to stop is a very poor programming approach.

Harry


All times are GMT. The time now is 07:24 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.