S
suns
Unregistered / Unconfirmed
GUEST, unregistred user!
来自:卷起千堆雪tyn, 时间:2002-1-6 18:40:00, ID:838602
来试试,呵呵
var
Form1: TForm1;
xx,yy :Integer;
implementation
{$R *.DFM}
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
xx :=x;
yy :=y;
Invalidate;
end;
procedure TForm1.FormPaint(Sender: TObject);
begin
with Canvas do
begin
MoveTo(0,yy);
LineTo(Form1.Width,yy);
MoveTo(xx,0);
LineTo(xx,Form1.Height);
end;
end;
我的画布上还有我自己画的一些坐标,所以Invalidate不能要,但我去掉后,画的线没颜色拉
来试试,呵呵
var
Form1: TForm1;
xx,yy :Integer;
implementation
{$R *.DFM}
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
xx :=x;
yy :=y;
Invalidate;
end;
procedure TForm1.FormPaint(Sender: TObject);
begin
with Canvas do
begin
MoveTo(0,yy);
LineTo(Form1.Width,yy);
MoveTo(xx,0);
LineTo(xx,Form1.Height);
end;
end;
我的画布上还有我自己画的一些坐标,所以Invalidate不能要,但我去掉后,画的线没颜色拉