T
Town
Unregistered / Unconfirmed
GUEST, unregistred user!
<br>只要在程序中加入如下代码,即可使form变成汉字的形状.<br><br>procedure TForm1.FormCreate(Sender: TObject);<br>var<br>rgn:HRGN;<br>begin<br> BeginPath(Canvas.Handle);<br> SetBkMode( Canvas.Handle, TRANSPARENT );<br> Canvas.Font.Name:= '宋体';<br> Canvas.Font.Size:=100;<br> Canvas.TextOut( 20, 20, '漂亮吗?');//用"漂亮吗?"作为form的形状<br> EndPath(Canvas.Handle);<br> rgn:= PathToRegion(Canvas.Handle);<br> SetWindowRgn( Handle, rgn, true );<br>end;<br>