closing any program and getting the handle to close it or the window name...Posted by al_Lan on December 12, 2002 at 11:03:49:
this is what i have managed to do... var Form1: TForm1; y : TDateTime; x : real; z , showtime : integer; CSHndl : Thandle; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); var code : integer; begin y := time; y := y + strtotime(edit1.text); edit1.Text := timetostr(y); label3.caption := timetostr(y); x := ShellExecute(CSHndl,NIL,PChar(label1.caption), nil,nil,SW_SHOWNORMAL); z := 0; end; procedure TForm1.Timer1Timer(Sender: TObject); var procedure TForm1.FormActivate(Sender: TObject); begin z := 0; y := time + 20; end; procedure TForm1.Button2Click(Sender: TObject); begin opendialog1.Execute; label1.caption := opendialog1.FileName; end; |
|