[DUG] Preventing form minimise
Alister Christie
alister at salespartner.co.nz
Wed Nov 14 14:47:07 NZDT 2007
Try (from about.com)
type
TForm1 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
procedure WMSysCommand
(var Msg: TWMSysCommand) ; message WM_SYSCOMMAND;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
{ TForm1 }
procedure TForm1.WMSysCommand(var Msg: TWMSysCommand);
begin
if (Msg.CmdType = SC_MINIMIZE) or
(Msg.CmdType = SC_MAXIMIZE) then
MessageBeep(0)
else
DefaultHandler(Msg) ;
end;
Alister Christie
Computers for People
Ph: 04 471 1849 Fax: 04 471 1266
http://www.salespartner.co.nz
PO Box 13085
Johnsonville
Wellington
John Bird wrote:
> Is there any simple way to prevent a form from being minimised other than
> setting the border style to bsToolwin etc (which removes the minimise
> button, but also removes the ability to resize the window).
>
> This is not the main application window, but a secondary form and I have
> found users get confused if they minimise it rather than closing it to get
> back to the main form, so I would like to prevent it being minimised....
>
> The form onHide event seems to apply to the window being closed rather than
> minimised....
>
> John
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: unsubscribe
>
>
>
More information about the Delphi
mailing list