Would it be possible to use SendMessage instead of WindowState in the Wm_LButtonUp proc? So instead of this:
qbsMax:
if not FullScreen then
begin
ParentForm.WindowState := wsNormal
else
ParentForm.WindowState := wsMaximized;
end;
Go to something like this:
qbsMax:
if not FullScreen then
begin
ReleaseCapture;
if ParentForm.WindowState <> wsNormal then
SendMessage(ParentForm.Handle,WM_SYSCOMMAND,SC_RESTORE,0)
else
SendMessage(ParentForm.Handle,WM_SYSCOMMAND,SC_MAXIMIZE,0);
end;
I sometimes need to intercept the window restore/max messages in my app and if the button uses WIndowState I can't seem to do that.
I was able to work around it by setting the button's ButtonStyle from qbsMax to qbsNone and then add code to the button's MouseUp. But maybe there's a reason for using WindowState?
Thanks. Not a big deal but thought I'd ask about it.
Would it be possible to use SendMessage instead of WindowState in the Wm_LButtonUp proc? So instead of this:
Go to something like this:
I sometimes need to intercept the window restore/max messages in my app and if the button uses WIndowState I can't seem to do that.
I was able to work around it by setting the button's ButtonStyle from qbsMax to qbsNone and then add code to the button's MouseUp. But maybe there's a reason for using WindowState?
Thanks. Not a big deal but thought I'd ask about it.