public<br> procedure WMNCPAINT(var msg: TWMNCPaint); message WM_NCPAINT;<br><br><br>procedure TForm1.WMNCPAINT(var msg: TWMNCPaint);<br>var<br> oldHDC: HDC;<br> newDC: HDC;<br>begin<br> OLDHDC := Canvas.Handle;<br> newDC := GetWindowDC(handle);<br> Canvas.Handle := newDC;<br> Canvas.FloodFill(2,2,clRed,fsBorder);<br> Canvas.Handle := oldHDC;<br> ReleaseDC(handle, newDC);<br>end;<br><br>procedure TForm1.FormCreate(Sender: TObject);<br>begin<br>SetWindowLong(Handle,GWL_STYLE,GetWindowLong(Handle,GWL_STYLE) and (not WS_CAPTION));<br>Height:=ClientHeight;<br>end;<br>这样写后,倒是可以实现,可惜闪烁太厉害