Как отключить закрытие основной формы в Borland C ++

StackOverflow https://stackoverflow.com/questions/584119

  •  06-09-2019
  •  | 
  •  

Вопрос

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.

Это было полезно?

Решение

В форме FormCloseQuery, набор CanClose к ложе.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top