R royal1442 Unregistered / Unconfirmed GUEST, unregistred user! 2006-01-09 #2 画线太麻烦了,还要擦除! 我以前做过类似的功能,用的 TShape 控件:高度小于等于窗体高度,宽度为1; 然后: procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin Shape1.Left := X + 1;//之所以不能等于X,是因为如果等于X,那么Shape1随着鼠标动,鼠标只能点击 Shape1 了。 end;
画线太麻烦了,还要擦除! 我以前做过类似的功能,用的 TShape 控件:高度小于等于窗体高度,宽度为1; 然后: procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin Shape1.Left := X + 1;//之所以不能等于X,是因为如果等于X,那么Shape1随着鼠标动,鼠标只能点击 Shape1 了。 end;