unit Unit14;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br> Dialogs;<br><br>type<br> TForm1 = class(TForm)<br> procedure FormCreate(Sender: TObject);<br> private<br> { Private declarations }<br> procedure WMNCPaint(var Msg: TWMNCPaint); message WM_NCPAINT;<br> public<br> { Public declarations }<br> end;<br><br>var<br> Form1: TForm1;<br><br>implementation<br><br>{$R *.dfm}<br><br>{ TForm1 }<br><br>procedure TForm1.WMNCPaint(var Msg: TWMNCPaint);<br>var<br> hDC: DWORD;<br> hBr: DWORD;<br> rc: TRect;<br>begin<br> hDC := GetDCEx(Handle, 0, DCX_WINDOW);<br> hBr := GetStockObject(GRAY_BRUSH);<br> GetWindowRect(Handle, rc);<br> FillRect(hDC, rc, hBr);<br> ReleaseDC(Handle, hDC);<br>end;<br><br>procedure TForm1.FormCreate(Sender: TObject);<br>var<br> dwStyle: DWORD;<br>begin<br> dwStyle := GetWindowLong(Handle, GWL_STYLE);<br> SetWindowLong(Handle, GWL_STYLE, dwStyle xor WS_CAPTION xor WS_SYSMENU);<br>end;<br><br>end.<br>