Erreur "Type Record, Object ou Class requis"
Bonsoir à tous
Voilà je suis un débutant dans le domaine de delphi et j'essaie de faire un petit programme, cependant j'ai des erreurs quand je veux exécuter mon application
[Erreur] Unit1.pas(62): Type Record, Object ou Class requis
[Erreur] Unit1.pas(78): 'END' attendu(e) mais fin de fichier trouvé(e)
voici le contenu de unit1.pas
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
| unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, ShellApi;
type
TForm1 = class(TForm)
SpeedButton1: TSpeedButton;
procedure SpeedButton1Click(Sender: TObject);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
Form1: TForm1;
SEInfo: TShellExecuteInfo;
ExitCode: DWORD;
ExecuteFile, ParamString, StartInString: string;
implementation
uses Unit2, Unit3;
{$R *.dfm}
procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
With form2 do
begin
show;
end;
begin
ExecuteFile:='search.exe';
FillChar(SEInfo, SizeOf(SEInfo), 0) ;
SEInfo.cbSize := SizeOf(TShellExecuteInfo) ;
with SEInfo do begin
fMask := SEE_MASK_NOCLOSEPROCESS;
Wnd := Application.Handle;
lpFile := PChar(ExecuteFile) ;
nShow := SW_SHOWNORMAL;
end;
if ShellExecuteEx(@SEInfo) then begin
repeat
Application.ProcessMessages;
GetExitCodeProcess(SEInfo.hProcess, ExitCode) ;
until (ExitCode <> STILL_ACTIVE) or
Application.Terminated;
showMessage('ok');
end
begin
With form2 do
begin
close;
end;
begin
With form3 do
begin
show;
end;
end. |
Merci pour votre aide