O
ohyee
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.FormCreate(Sender: TObject);
var
rgn:HRGN;
begin
BeginPath(Canvas.Handle);
SetBkMode( Canvas.Handle, TRANSPARENT );
Canvas.Draw(1,1,Image1.Picture.Graphic);//我在窗口中加了一个TIMAGE控件
EndPath(Canvas.Handle);
CloseFigure(Canvas.Handle);//如果我不加此行就会出超出内存错误,加上则提示不能完成;
rgn:= PathToRegion(Canvas.Handle);
SetWindowRgn( Handle, rgn, true );
end;
var
rgn:HRGN;
begin
BeginPath(Canvas.Handle);
SetBkMode( Canvas.Handle, TRANSPARENT );
Canvas.Draw(1,1,Image1.Picture.Graphic);//我在窗口中加了一个TIMAGE控件
EndPath(Canvas.Handle);
CloseFigure(Canvas.Handle);//如果我不加此行就会出超出内存错误,加上则提示不能完成;
rgn:= PathToRegion(Canvas.Handle);
SetWindowRgn( Handle, rgn, true );
end;