情人节里的礼物:情人的玫瑰(0分)

S

smilboy

Unregistered / Unconfirmed
GUEST, unregistred user!
情人的玫瑰
http://asp3.6to23.com/lirenzhao/Rose.zip
 
好玩不?会玩了吧!
死去吧你!
 
玩的吐血,还好知道如何关闭,我倒~
form2兄也应该搞个时间限制呀。
要是送个哪个白痴MM就玩完了~
 
谁啊,这么没良心,前面的也不说一下,不过也怪自己笨,
阿西喊佛,道是有良心的人,可是等我玩了再说
命苦啊
 
agree with 阿西喊佛
 
送原程序,增加了鼠标移动自动退出
这会不怕白痴妹妹了吧,可作为屏幕保护
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, jpeg, ExtCtrls;
type
TfrmMain = class(TForm)
Image1: TImage;
Timer1: TTimer;
procedure Timer1Timer(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
x,y:Integer;
procedure DrawRose(x,y:Integer);
public
{ Public declarations }
end;

var
frmMain: TfrmMain;
implementation
{$R *.dfm}
{ TForm1 }
procedure TfrmMain.DrawRose(x, y: Integer);
var
sc:TCanvas;
begin
sc:=TCanvas.Create;
try
sc.Handle:=GetDC(0);
sc.Pen.Style := psClear;
sc.Draw(x - Image1.Width,y - Image1.Height,image1.Picture.Graphic);
ReleaseDC(0, sc.handle);
finally
sc.free;
end;
end;

procedure TfrmMain.Timer1Timer(Sender: TObject);
begin
randomize;
DrawRose(Random(Screen.Width + Image1.Width),Random(Screen.Height + Image1.Height));
if (x <> 0) and (y <> 0) then
begin
if (Mouse.CursorPos.X <> x) and (Mouse.CursorPos.Y <> y) then
begin
Application.Terminate;
end;
end;
x := Mouse.CursorPos.X;
y := Mouse.CursorPos.Y;
end;

procedure TfrmMain.FormCreate(Sender: TObject);
begin
if FindWindow(nil,'情人节玫瑰') > 0 then
Application.Terminate;
Caption := '情人节玫瑰';
x := 0;
y := 0;
end;

end.
 
procedure TfrmMain.Timer1Timer(Sender: TObject);
var
rt: TRect;
begin
randomize;
DrawRose(Random(Screen.Width + Image1.Width),Random(Screen.Height + Image1.Height));
if (x <> 0) and (y <> 0) then
begin
if (Mouse.CursorPos.X <> x) and (Mouse.CursorPos.Y <> y) then
begin
rt := Rect(0, 0, Screen.Width, Screen.Height);
InvalidateRect(0, @rt, TRUE);
//这里刷新一下桌面就完美了
Application.Terminate;
end;
end;
x := Mouse.CursorPos.X;
y := Mouse.CursorPos.Y;
end;
 
接受答案了.
 

Similar threads

回复
0
查看
578
不得闲
D
回复
0
查看
711
DelphiTeacher的专栏
D
顶部