代码如下:
| procedure WMNCPAint(var Mes : TWMNCPaint); message WM_NCPAINT; procedure TForm1.WMNCPAint(var Mes : TWMNCPaint); var ACanvas : TCanvas; begin ACanvas := TCanvas.Create; try ACanvas.Handle := GetWindowDC(Form1.Handle); with ACanvas do begin Brush.Color := clActiveCaption; Font.Name := 'Times New Roman'; Font.Size := 10; Font.Color := clCaptionText; Font.Style := [fsItalic, fsBold]; TextOut(GetSystemMetrics(SM_CYMENU) + GetSystemMetrics(SM_CXBORDER), Round((GetSystemMetrics(SM_CYCAPTION) - Abs(Font.Height))/2) +1, ' Your title here!'); end; finally ReleaseDC(Form1.Handle, ACanvas.Handle); ACanvas.Free; end; end; |
原创文章如转载,请注明:转载自心动吧DELPHI网络书 [ http://www.abcxd.com/delphi/ ]
本文链接地址:http://www.abcxd.com/delphi/abcxddelphi/delphiZT/23.html