主题:  怎样检测系统有没有安装Flash播放器?

小星星

职务:普通成员
等级:1
金币:0.0
发贴:40
注册:2001/5/30 17:01:49
#12004/2/24 15:26:53
程序中有插如swf,如果用户没有安装Flash 插件,就不能看swf动画,希望程序能自动检测,再提醒用户安装。



与人同乐

职务:管理员
等级:6
金币:18.0
发贴:3928
注册:2001/3/11 15:45:42
#22004/2/24 19:07:15
检查控件ID(例如D27CDB6E-AE6D-11cf-96B8-444553540000),没有则提示安装,ActiveX开头的系列函数就是干这个用的。



小星星

职务:普通成员
等级:1
金币:0.0
发贴:40
注册:2001/5/30 17:01:49
#32004/2/24 20:42:01
Y,能具体的说一下吗?多谢了.



与人同乐

职务:管理员
等级:6
金币:18.0
发贴:3928
注册:2001/3/11 15:45:42
#42004/2/25 7:32:07
ShowMe中ActiveX文件夹下有现成的范例,打开看一下,主要是以下几句:
--this is the ID of the control, you can determine the ID by clicking Options and then URL from the Sprite Icon Properties dialog box.
IDFlash:= "{D27CDB6E-AE6D-11CF-96B8-444553540000}"

if ActiveXControlQuery(IDFlash) = 0 then
-- check for the security settings that will allow us to download all controls
MB_Returnedvalue:=6
repeat while (ActiveXDownloadSetting() = "Disabled" | ActiveXSecuritySetting() ="High" & MB_Returnedvalue=6
MB_Caption:="ActiveX Security Settings"
MB_BodyText:="Your ActiveX Security settings may prevent this application from installing an ActiveX control. You must enable ActiveX downloading and set the Security Method to Medium or None. Would you like to change your settings now?"
MB_BoxNumber:=36
MB_Returnedvalue:=MessageBox(WindowHandle,MB_BodyText,MB_Caption,MB_BoxNumber)
if MB_Returnedvalue=6 then
ActiveXSecurityDialog()
end if
end repeat

-- call the download function of the control
ActiveXControlDownload(IDFlash, "swflash.cab", -1, -1, -1, -1)
end if