uses ActiveX
//
function ProgIDInstalled(const PID: string): Boolean;
var
WPID: WideString; // PID as wide string
Dummy: TGUID; // unused out value from CLSIDFromProgID function
begin
WPID := PID;
Result := ActiveX.Succeeded(
ActiveX.CLSIDFromProgID(PWideChar(WPID), Dummy)
);
end;
function IsIEInstalled: Boolean;
begin
Result := ProgIDInstalled('InternetExplorer.Application');
end;
Beispiel :
procedure TForm1.Button1Click(Sender: TObject);
begin
if IsIEInstalled = true then
label1.Caption := 'yes'
else
label1.Caption := 'no';
end;
Keine Kommentare:
Kommentar veröffentlichen