Fareyi Takip Eden From ( Eğlencelik Angarya Bir Proje )
-
bir form aç içinde bir timer koy ve aşağıdaki kodu yapıştır komple.
==============================================================================
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;type
TForm1 = class(TForm)
Timer1: TTimer;
Label1: TLabel;
Label2: TLabel;
procedure FormCreate(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
SetWindowLong( Handle,GWL_STYLE,GetWindowLong( Handle, GWL_STYLE )and not WS_CAPTION );
SetWindowLong(Application.Handle,GWL_EXSTYLE, WS_EX_TOOLWINDOW);
SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE);
end;procedure TForm1.Timer1Timer(Sender: TObject);
var
m:tmouse;
begin
m:=tmouse.create;
form1.Left:=m.CursorPos.x;
form1.top:=m.CursorPos.y;
m.Free;end;
end.
=============================================================================
kaynak kodu ve demosu için :
http://rapidshare.com/files/154190411/mausu_takip_eden_yaz__305_.rar.html
-
timer ın interval'ı kaç ?
biraz yavaş takip ediyor sanki :/
-
SharpShooter bunu yazdı:
-----------------------------timer ın interval'ı kaç ?
biraz yavaş takip ediyor sanki :/
-----------------------------opsyonel kafana göre takıl :D