loading...
It's hard to tell the world we live in is either a reality or a dream.
首页 | 相册 | 标签 | 发发小疯 | 技术共享 | 脚本收集 | 博客教程 | 音乐收藏 | Flash/RIA多人联网
loading...

DELPHI 振屏的实现(窗口抖动)

[ 2008-7-7 10:27:00 | By: 宝贝得很 ]

简单的试了一下类似QQ,MSN的窗口抖动的功能

unit Unit2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm2 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

{$R *.dfm}

procedure TForm2.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 + 5;
         Self.Left := l + 5;
         seed := 1;
       end;
    1: begin
         self.Top := t - 5;
         Self.Left := l - 5;
         seed := 0;
       end;
    end;
    SleepEx(50,True);
end;
self.Top := t;
Self.Left := l;

end;

end.

  • 标签:DELPHI 
  • Re:DELPHI 振屏的实现(窗口抖动)

    [ 2008-7-13 22:13:08 | By: xiaodeng(游客) ]
    你真的很厉害
    个人主页 | 引用 | 返回 | 删除 | 回复

    发表评论:

      大名:
      密码: (游客无须输入密码)
      主页:
      标题:
      loading...
    Powered by Oblog.