home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 September
/
Chip_2002-09_cd1.bin
/
zkuste
/
delphi
/
experti
/
d45
/
FRMWIZRD.ZIP
/
LKDemoForms.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
2002-05-30
|
851b
|
43 lines
unit LKDemoForms;
interface
uses Classes, Forms, Messages, Windows;
type
//Testdescendant of TForm: Adds the published boolean property "MinimizesApp".
// When set to TRUE, minimizing this form mimimizes the entire Application.
TLKDemoForm = class(TForm)
private
fMinApp: Boolean;
procedure SetMinApp(Value: Boolean);
procedure WMSysCommand(var Msg: TMessage); message WM_SysCommand;
public
published
property MinimizesApp: Boolean read fMinApp write SetMinApp;
end;
implementation
procedure TLKDemoForm.SetMinApp(Value: Boolean);
begin
fMinApp := Value;
end;
procedure TLKDemoForm.WMSysCommand(var Msg: TMessage);
begin
if fMinApp and ((Msg.wParam = SC_MINIMIZE) or (Msg.wParam = SC_ICON)) then
begin
Application.Minimize;
Msg.Result := 1;
end
else
inherited;
end;
end.