Forum > Carbon
Minimize on 'x' and close by system application menu?
User137:
Can't you have a separate application menu or button that use the "ReallyCanClose" variable? That would be the preferred way to close it. When i recall for example Miranda messenger behavior it only operates in system tray. Only way to quit it is opening its application controlled popup.
rajivsoft:
--- Quote from: User137 on February 16, 2011, 03:42:45 pm ---Can't you have a separate application menu or button that use the "ReallyCanClose" variable? That would be the preferred way to close it. When i recall for example Miranda messenger behavior it only operates in system tray. Only way to quit it is opening its application controlled popup.
--- End quote ---
Windows version of program has exit voice in main menu which is used as 'real exit', but in mac you have system exit menu, so there is non need of another one exit...
I would like only to know how to make like for example in chrome where ehen you click on red 'x' it closes form and tubs, but program itself remain opened and you can open new form with new tab from main menu.
A tricky way to do it is to create on startup an empty form with only main menu, wich creates another form with all stuff, so when you close child form it only hides (canclose := false and windowstate = wsminimized) and i can always exit application from system menu exit. But it's only a workaround, not what it really must be...
rajivsoft:
I'v seen that Skype is hiding main form on 'x' and exit program from system menu... (what also I need) but it's written in Object C and native Carbon... anybody know how to have same functionality via LCL and Lazarus?
zeljko:
YourForm.OnCloseQuery()
begin
CanClose := False;
Hide;
end;
should do the job if I correctly understood you
rajivsoft:
--- Quote from: zeljko on March 09, 2011, 09:22:45 pm ---YourForm.OnCloseQuery()
begin
CanClose := False;
Hide;
end;
should do the job if I correctly understood you
--- End quote ---
No, you haven't read all my post, i'v already tried this way, but doing so also makes system 'Exit from yourapplication' to hide form because it fires same YourForm.OnCloseQuery... which is not exit as menu says and you can't modify caption of application system menu (i have tried).
Navigation
[0] Message Index
[#] Next page
[*] Previous page