- Code: Select all
Public
procedure WMSysCommand(var Msg: TWMSysCommand) ; message WM_SYSCOMMAND;
.........
procedure TForm1.WMSysCommand;
begin
if (Msg.CmdType = SC_MINIMIZE) Then
{ code here }
This works fine. And I'm able to put code to add a icon in System Tray here. BUT, my form acts really strange. I can't move the form, can't maximize, can't close. So i tried to put
- Code: Select all
if (Msg.CmdType = SC_CLOSE) Then
Exit;
But that didn't work either. So i wonder if someone know who to solve this or got anorher code to put code when press Minimize button. Because i haven't found another code for that.
/Thanks