Guest_imported
New member
- Jan 1, 1970
- 0
I am having problems with "passing parameters from HTML to ActiveX with <param name="myName" value="myParam">" .
Steps followed:
--------------------
I made the control safe for initialization by implementing the IObjectSafety interface and digitally signed the .cab file .
I am guessing that the problem should be with my browser settings bcoz after I run the activeX control it displays a message
Error:
"This page provides unsafe information to activeX control. Your current security setting prohibit running controls in this manner.
As a result, this page may not display correctly."
Problems:
-------------
I am trying this on Win2000 machine and I have IE5.5 version.
1.What should my browser security settings be?? OR what causes the above error message??
2. the param value is not displayed ever...
.html
--------
<OBJECT ID="UserControl1"
CLASSID="CLSID:..."
CODEBASE="Project1.ocx">
<PARAM NAME="myTest" VALUE="1">
</OBJECT>
userControl
---------------
Dim myTest As Long
Public temp As Long
Public Property Get myVar() As Long
myVar = myTest
End Property
Public Property Let myVar(ByVal NewTest As Long)
myVar = NewTest
PropertyChanged "myVar"
End Property
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
PropBag.WriteProperty "myVar", myTest, ""
End Sub
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
myVar = PropBag.ReadProperty("myTest", "2"
End Sub
Private Sub UserControl_Click()
temp = myVar
Load Form1
Call Form1.ControlRef(Me) 'pass the reference before showing
Form1.Show 1
End Sub
Private Sub UserControl_Initialize()
Call UserControl_Click
End Sub
Form1.frm
-------------
Dim cCtl As UserControl1
Private Sub Form_Activate()
Print cCtl.myVar
End Sub
Sub ControlRef(cC As UserControl1)
Set cCtl = cC
End Sub
Thanks a lot.
vuy.
Steps followed:
--------------------
I made the control safe for initialization by implementing the IObjectSafety interface and digitally signed the .cab file .
I am guessing that the problem should be with my browser settings bcoz after I run the activeX control it displays a message
Error:
"This page provides unsafe information to activeX control. Your current security setting prohibit running controls in this manner.
As a result, this page may not display correctly."
Problems:
-------------
I am trying this on Win2000 machine and I have IE5.5 version.
1.What should my browser security settings be?? OR what causes the above error message??
2. the param value is not displayed ever...
.html
--------
<OBJECT ID="UserControl1"
CLASSID="CLSID:..."
CODEBASE="Project1.ocx">
<PARAM NAME="myTest" VALUE="1">
</OBJECT>
userControl
---------------
Dim myTest As Long
Public temp As Long
Public Property Get myVar() As Long
myVar = myTest
End Property
Public Property Let myVar(ByVal NewTest As Long)
myVar = NewTest
PropertyChanged "myVar"
End Property
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
PropBag.WriteProperty "myVar", myTest, ""
End Sub
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
myVar = PropBag.ReadProperty("myTest", "2"
End Sub
Private Sub UserControl_Click()
temp = myVar
Load Form1
Call Form1.ControlRef(Me) 'pass the reference before showing
Form1.Show 1
End Sub
Private Sub UserControl_Initialize()
Call UserControl_Click
End Sub
Form1.frm
-------------
Dim cCtl As UserControl1
Private Sub Form_Activate()
Print cCtl.myVar
End Sub
Sub ControlRef(cC As UserControl1)
Set cCtl = cC
End Sub
Thanks a lot.
vuy.