WMSysCommand canceling move
- From: battles <battles@xxxxxxxxxxxxxx>
- Date: Tue, 7 Oct 2008 12:21:24 -0700 (PDT)
I am having to capture the WMSysCommands and it is apparently
capturing the ability to move the form by the title bar. Does anyone
know the way to get the move to work again? Thanks.
procedure TForm1.WMSysCommand;
begin
if (Msg.CmdType = SC_MOVE) then <---- something like this?
...
if Msg.CmdType = SC_CLOSE then //close doesn't work
without this
Close;
if (Msg.CmdType = SC_MINIMIZE) or // - button (upper
right of form next to X button)
(Msg.CmdType = SC_MAXIMIZE) or // single pane button
(Msg.CmdType = SC_RESTORE) then begin // double pane button
if EncartaButton5.Caption = 'Start' then begin
Mouse.CursorPos := (Point( (Screen.DesktopWidth div 2) -
25,
(Screen.DesktopHeight div 2) +
35));
case MessageDlg('Monitoring suspended. Start monitoring?',
mtConfirmation, [mbYes, mbNo], 0) of
mrYes : begin
RxTrayIcon1.Icon :=
RxTrayIcon1.Icons.Icons[0];
Button5Click(nil);
end;
mrNo : RxTrayIcon1.Icon :=
RxTrayIcon1.Icons.Icons[2];
end;
end;
Form1.Hide;
end;
//// DefaultHandler(Msg); //take this out to stop min/max/stop
action
end;
.
- Follow-Ups:
- Re: WMSysCommand canceling move
- From: Rob Kennedy
- Re: WMSysCommand canceling move
- Prev by Date: Re: Remove dotted indication in Tlistbox
- Next by Date: Re: WMSysCommand canceling move
- Previous by thread: Remove dotted indication in Tlistbox
- Next by thread: Re: WMSysCommand canceling move
- Index(es):