Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > Apps

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 10-27-2010, 10:37 AM
axxa axxa is offline
Member
 
Join Date: Oct 2009
Posts: 37
Thumbs down 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...
How can I do?! I need to kill my application but I don't know how..
Thank you very much for any idea...
Reply With Quote
  #2  
Old 10-30-2010, 12:55 AM
HarryCL2 HarryCL2 is offline
Senior Member
 
Join Date: Jun 2010
Posts: 163
Default

Quote:
Originally Posted by axxa View Post
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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:33 PM.


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