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
|
Procedure Appel_Navigateur_Liv(Liv_Pointe: integer);
var
StartupInfo: TStartupinfo;
ProcessInfo: TProcessInformation;
Retour : longbool;
Appel, Rep : string;
Url : string;
begin
Form1.CoolTrayIcon1.IconVisible := True; // Composant CoolTrayIcon
Form6.Hide; // Cache la form
Form1.CoolTrayIcon1.HideMainForm; // Cache aussi la form
Rep := Rep_Instal_Logiciel;
FillChar(Startupinfo,Sizeof(TStartupinfo),0);
Startupinfo.cb:=Sizeof(TStartupInfo);
Url := Lst_Livres.Url_Liv.Strings[Livre_Pointe];
Appel := 'c:\Program Files\Mozilla Firefox\Firefox.exe' + ' ' + Url;
Retour := CreateProcess(nil,
PChar(Appel),
nil,
nil,
false,
normal_priority_class,
nil,
PChar(Rep),Startupinfo,ProcessInfo);
Form1.CoolTrayIcon1.ShowMainForm; // La forme réapparaît
Form6.Show; // La forme réapparaît
if Retour <> false then
begin
WaitforSingleObject(Processinfo.hProcess, infinite);
CloseHandle(ProcessInfo.hProcess);
end
else
begin
MessageDlg('ERREUR en appel de Sauvegarde Mozilla !'+#13+#10+'Erreur = ', mtError, [mbOK], 0);
end;
end; |
Partager