Thema: Delphi Delay abbrechen

Einzelnen Beitrag anzeigen

Benutzerbild von XXcD
XXcD

Registriert seit: 19. Sep 2006
581 Beiträge
 
Delphi 2007 Professional
 
#14

Re: Delay abbrechen

  Alt 20. Sep 2006, 21:48
Ok hier ist der quelltext ich brauch nur den stopdelay rein:
Zitat:
unit Unit1;

interface

uses
Windows, Messages, Shellapi, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, ComCtrls, ImgList, Menus, StdCtrls, jpeg, ExtDlgs;

type
TForm1 = class(TForm)
Edit2: TEdit;
Image1: TImage;
Image2: TImage;
Image3: TImage;
Klickomat: TTrayIcon;
Image4: TImage;
Edit4: TEdit;
Image5: TImage;
ComboBox1: TComboBox;
Edit1: TEdit;
Edit3: TEdit;
Image7: TImage;
Image8: TImage;
procedure Image4Click(Sender: TObject);
procedure Image3Click(Sender: TObject);
procedure KlickomatClick(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure delay(msec:longint);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.delay(msec:longint);
var
start,stop:longint;
begin
start := gettickcount;
repeat
stop := gettickcount;
application.processmessages;
until (stop - start ) >= msec;
end;

procedure TForm1.Button1Click(Sender: TObject);
var i: Integer;
begin
i:=0;
REPEAT

begin i++
ShellExecute(Application.Handle, 'open',
PChar('http://wow..............com'), nil, nil,


SW_ShowNormal);
delay( 1920000);
end; UNTIL i=4
end;

procedure TForm1.KlickomatClick(Sender: TObject);
begin
ShellExecute(Application.Handle, 'open',
PChar('http://wow.............com'), nil, nil,
SW_ShowNormal);

end;


end.
  Mit Zitat antworten Zitat