现在的QQ,MSN都拥有窗体抖动的功能,其实要实现它并不困难 窗体之所以会表现为“抖动”,其实质就是窗体的坐标在变化。与是就有了下面这些代码: procedure TForm1.Button1Click(Sender: TObject); var i: Integer; t: Integer; l: Integer; seed: Integer; begin t:=Self.Top; l:=self.Left; seed := 0; for i:=0 to 15 do begin Application.ProcessMessages; case seed of 0: begin self.Top := t + 10; Self.Left := l + 10; seed := 1; end; 1: begin self.Top := t - 10; Self.Left := l - 10; seed := 0; end; end; SleepEx(50,True); end; self.Top := t; Self.Left := l; end;
窗体抖动的实现
最新推荐文章于 2021-02-28 18:02:41 发布