Tmessage. wparam is twmsyscommand. commantype; this is the system command number.
The following program intercepts wparam and displays the Form title.
Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls; Type tform1 = Class (tform) protected procedure wmsyscommand (VAR message: twmsyscommand); message wm_syscommand; end; var form1: tform1; implementation {$ R *. DFM} procedure tform1.wmsyscommand (VAR message: twmsyscommand); var STR: string; begin case message. required type of SC _size: Str: = 'SIZE'; SC _move: Str: = 'move '; SC _minimize: Str: = 'minimize'; SC _maximize: Str: = 'maximize'; SC _nextwindow: STR: = 'nextwindow'; SC _prevwindow: Str: = 'prevwindow'; SC _close: Str: = 'close'; SC _vscroll: Str: = 'vscroll '; SC _hscroll: Str: = 'hscroll '; SC _mousemenu: Str: = 'mousemenu'; SC _keymenu: Str: = 'keymenu '; SC _arrange: Str: = 'arrange'; SC _restore: Str: = 'restore'; SC _tasklist: Str: = 'tasklist'; SC _screensave: Str: = 'screensave'; SC _hotkey: Str: = 'hotkey'; SC _default: Str: = 'default'; SC _monitorpower: Str: = 'monitorpower'; SC _contexthelp: Str: = 'contexthelp'; SC _separator: Str: = 'separator'; 61441: Str: = 'drag the left border '; 61442: Str: = 'drag the right border'; 61443: Str: = 'drag the upper border '; 61444: Str: = 'drag the upper left corner '; 61445: Str: = 'drag upper right corner '; 61446: Str: = 'drag bottom border'; 61447: Str: = 'drag lower left corner '; 61448: Str: = 'drag the lower right corner '; 61458: Str: = 'drag the title bar'; 61558: Str: = 'horizontal scroll bar '; 61574: Str: = 'double-click horizontal scroll bar'; 61575: STR: = 'vertical scroll bar rolling '; 61559: Str: = 'double-click vertical scroll bar'; 61587: Str: = 'click the minimization icon '; 61490: Str: = 'double-click the title bar when maximization '; 61730: Str: = 'double-click the title bar when maximization'; end; If STR = ''then STR: = inttostr (message. optional type); text: = STR; inherited; end.