方法1:
uses comobj;
procedure TForm1.Button1Click(Sender: TObject);
var
v:variant;
begin
v:=CreateOleObject('ShockwaveFlash.ShockwaveFlash');
if not VarIsNull(v)
procedure TForm1.Button1Click(Sender: TObject);
var
v:variant;
begin
v:=CreateOleObject('ShockwaveFlash.ShockwaveFlash');
if not VarIsNull(v)
then showmessage('安装的FLASH控件')
else showmessage('没有安装的FLASH控件'');
end;
方法2:
uses ActiveX;
var
AGUID: TGUID;
if not Succeeded(CLSIDFromProgID('ShockwaveFlash.ShockwaveFlash', AGUID)) then
//没安装
var
AGUID: TGUID;
if not Succeeded(CLSIDFromProgID('ShockwaveFlash.ShockwaveFlash', AGUID)) then
//没安装