delphi 点击关闭按钮时隐藏窗口
在主窗体的CloseQuery事件里,使用messagebox进行提示,根据选择的按钮对Canclose进行设置就可以了如beginif messagebox(handle, '是否退出程序', '提示', MB_YESNO ) = IDNO thenCanclose := False;end;