2009-02-24 59 views
2
 
When closing an application on close button (FormClose handler is called), 
there is a dialog if user is sure that he wants to close the application. 
If the result of the dialog is mrCancel, then I try to set the ModalResult 
of a main form to mrNone like I do with other forms, but even though, the 
application still closes. 

What is the solution? 

Cheers. 

+0

增加了C++ builder和vcl標籤 – stukelly 2009-02-26 20:18:53

回答

5

在窗體的FormCloseQuery中,將CanClose設置爲false。

+0

更多信息請訪問:http://tinyurl.com/dhyuvx – stukelly 2009-02-25 21:06:42