كيف تنفيذ زر Button تلقائيا بعد وقت محدد
#4
في الحقيقة لم ارى جواب الاخ noor.aldeen.sha

لكن إليك طرقتي وهي من خلال إستعمال دوال WinAPI :
PHP كود :
unit Unit1;

interface

uses
  Winapi
.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;

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

var
  
Form1: TForm1;
  
IdFunction : Cardinal;

implementation

{$R *.dfm}

procedure PressNextButton();
begin
  Form1
.Button2Click(Form1.Button2);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  form1
.Caption := '1';
  
IdFunction := SetTimer(0,0,4000,@PressNextButton)
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  form1
.Caption := '2222' + Form1.Caption;
  
KillTimer(0,IdFunction)
end;

end. 

إن اشكل عليك شيء تفضل بالسؤال
الرد


الردود في هذا الموضوع
كيف تنفيذ زر Button تلقائيا بعد وقت محدد - بواسطة ALmuhhnad - 02-02-2014, 04:23 PM

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 3 ) ضيف كريم