Author: Jonas Bilinkevicius Does anybody know how to capture the minimize button press and act on it before it actually minimizes the form? Answer: You should intercept WM_SYSCOMMAND messages like this: 1 unit Unit1; 2 3 interface 4 5 uses 6 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, Forms, 7 Dialogs; 8 9 type 10 TForm1 = class(TForm) 11 public 12 procedure WMSysCommand(var Msg: TWMSysCommand); message WM_SYSCOMMAND; 13 end; 14 15 var 16 Form1: TForm1; 17 18 implementation 19 20 {$R *.DFM} 21 22 procedure TForm1.WMSysCommand; 23 begin 24 if (Msg.CmdType = SC_MINIMIZE) or (Msg.CmdType = SC_MAXIMIZE) then 25 MessageBeep(0); 26 DefaultHandler(Msg); 27 end; 28 29 end.