Link to home
Start Free TrialLog in
Avatar of Joshua Sprague
Joshua Sprague

asked on

ActiveX Allowed or Not

I have a control that uses activeX, but is not completely activeX. dont ask how just believe me.

I want to be able to determine if the user has disabled activeX so i can prevent my control from running.

if activeX is disabled or dis-allowed then the control will start its job and not finish, so i would rather just not start it.

does anyone know of a way to check this?
ASKER CERTIFIED SOLUTION
Avatar of stengelj
stengelj
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Joshua Sprague
Joshua Sprague

ASKER

i tested the page that you found it on, and that is EXACTLY what i want. unfortunately, the pages i need it on are in C#. could you please tell me how to do this in c#?
new point value is : 100

thank you
I'm sorry but I don't know C#, but I'll bet somone here does:
https://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/

You could either open a new question in that area or create a pointer question that links to this question and hope that someone from that area comes over to help.  Or, keep this thread open for a while and maybe someone else will see this question who can help convert it.
thanx, i figured it out. i based my code on what you showed me.
i used vbscript / javascript.
here is what i did.

VBScript Function:

'
' Function ActiveXEnabled
'
function activexenabled()
  on error resume next
  activex = (NOT IsNull(CreateObject("ScriptBridge.ScriptBridge")))
  activex2 = (NOT IsNull(CreateObject("MSComctlLib.Slider")))
  activex3 = (NOT IsNull(CreateObject("ScriptBridge.ScriptBridge.1")))
  if (activex OR activex2 OR activex3) then
      activexenabled = true
  else
      activexenabled = false
  end if
end function

I used javascript to call the function and test for ActiveX being enabled / disabled.

If it was disabled, i used the javascript     document.writeln     to comment out the ActiveX control.

works perfectly.

thank you.
Cool.  That looks like a nice adaptation.