Link to home
Start Free TrialLog in
Avatar of cbonjovi
cbonjovi

asked on

Passing parameters to Activex control from HTML

I've built an activex control (.ocx) in Visual Basic.  The html page referring to it is like:

<HTML>
<HEAD>
<TITLE>SimpleActiveX.CAB</TITLE>
</HEAD>
<BODY>
<OBJECT CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331">
<OBJECT ID="UserControl1"
CLASSID="CLSID:92DB2110-F7BD-11D4-B3CA-E0865BC10000"
CODEBASE="SimpleActiveX.CAB#version=1,0,0,0">
</OBJECT>
</BODY>
</HTML>

which permits to launch the control accessing this page.

The question is I have to pass some parameters to the ocx.
I think <PARAM> tag after <OBJECT> could be right, but I don't know how to get these in the Visual Basic code (the control).
Thank you very much for the contribution,
Chris
Avatar of Dave_Greene
Dave_Greene

I'll get you my step by step instructions... one second :)
Ok, here is the step by step example.

1) Create an OCX Project (ActiveX Control)
2) right click your control, select add UserControl, then when you get into the VB dialog where you
normally select a usercontrol, select the wizard.
3) Add the Property you want to expose eg (Message) "My Custom Members" in the wizard
4) doesn't map to a control
5) When you get to the set attributes page, set Message to a string.

Your New Control Should Look Like this

'CODE BEGIN

'Default Property Values:
Const m_def_Message = "Empty Message"
'Property Variables:
Dim m_Message As String
'Event Declarations:

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MemberInfo=13,0,0,Empty Message
Public Property Get Message() As String
 Message = m_Message
End Property

Public Property Let Message(ByVal New_Message As String)
 m_Message = New_Message
 PropertyChanged "Message"
 MsgBox "Here is the Message you passed [" & m_Message & "]"
End Property

'Initialize Properties for User Control
Private Sub UserControl_InitProperties()
 m_Message = m_def_Message
End Sub

'Load property values from storage
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
 m_Message = PropBag.ReadProperty("Message", m_def_Message)
End Sub

'Write property values to storage
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
 Call PropBag.WriteProperty("Message", m_Message, m_def_Message)
End Sub

'CODE END

6) Build your OCX
7) set binary compatibility on the control in the projects properties.
8) Add a standard EXE to your project group
9) Place the Control onto form1.
10) Check to see if the value you set in the controls property page (on form1) actually change the value,


if so proceed.

If not, it's time to write a comment on EE stating so. (listing the control code)
11) it worked!  yahoo!  Now build your OCX again just to be certain you have any changes
12) Use the Package and Deployment wizard to build the deployment
- Using the "Internet Package" option
- Take the defaults until you get to the "Safety Settings" tab, you will select "NO" for Safe for

Scripting, and

"YES" for safe for initialization.
- Now you are finished... with this step
13) now look into the directory where you built the package. you should see projectName.htm, open it
 
It should look something like this

'HTML BEGIN

<HTML>
<HEAD>
<TITLE>Project1.CAB</TITLE>
</HEAD>
<BODY>
<!--     If any of the controls on this page require licensing, you must
  create a license package file. Run LPK_TOOL.EXE to create the
  required LPK file. LPK_TOOL.EXE can be found on the ActiveX SDK,
  http://www.microsoft.com/intdev/sdk/sdk.htm. If you have the Visual
  Basic 6.0 CD, it can also be found in the \Tools\LPK_TOOL directory.

  The following is an example of the Object tag:

<OBJECT CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331">
  <PARAM NAME="LPKPath" VALUE="LPKfilename.LPK">
</OBJECT>
-->

<OBJECT ID="UserControl1"
CLASSID="CLSID:291EACFF-517D-4B6C-9EF0-A329A541AD8C"
CODEBASE="Project1.CAB#version=1,0,0,0">
</OBJECT>
</BODY>
</HTML>

'HTML END

14) Make the following changes (per this example)
    <OBJECT ID="UserControl1" Height="400" Width="400"  <--however big the control is
  CLASSID="CLSID:291EACFF-517D-4B6C-9EF0-A329A541AD8C"
  CODEBASE="Project1.CAB#version=1,0,0,0">
     param name="Message" value="Your New Message here!"
15) Save your changes and run the projectname.htm
16) If it works great, if not... time to comment again  :)

Cheers!  
<PARAM> tag sets properties of your control. That's all there is to it.
gbaren...  really???  I think you're a little mistaken.  There are a few places where people get confused on this issue.  Property bag...  Scripting settings...  Binary Compatibility...  Control dimensions...  But you already knew all of this... that's why it's so simple for you.  But others have yet to attain your level of expertise...  that's why I'm helping them...
It'll be OK Dave. We're all friends here. There's no conspiracy against you.

Deep breath...
Let it out...
Repeat

Now, cbonjovi,

The <PARAM> tag set properties of your control. That's all.
gbaren,

you are wrong... Cut and Paste my instuctions into a document, so that when you try to do it, it will be easier for you.

cbonjovi,

Sorry about the distraction, I cannot control the quality of comments on these boards.
From Microsoft's MSDN documentation:

PARAM Element | param Object

--------------------------------------------------------------------------------

Sets the initial value of a property for an APPLET, EMBED, or OBJECT element.

http://msdn.microsoft.com/workshop/Author/dhtml/reference/objects/PARAM.asp
I know Dave, don't bother. MICROSOFT IS WRONG TOO!
Great that is one tiny part of the process...  small victory for you...  yipppeee!!!  Now SHOOOSH
"I think <PARAM> tag after <OBJECT> could be right, but I don't know how to get these in the Visual Basic
code (the control)."

-They already knew about the PARAM tag...  I even posted it before you...

But here's the humdinger...

-"but I don't know how to get these in the Visual Basic
code (the control)."

The PARAM Tag is not going to help them with the CODE in the CONTROL...

gbaren,

Reading the Question is a key element to helping others  :)
Expert Guidelines:


--------------------------------------------------------------------------------


Act Professionally - no spamming, no bad language, no personal conflicts, be respectful, keep your content clean: feel free to notify us of violators.
Notify away gbaren, if you would like your inability to properly read a question to spread beyond this thread.  I gave you 2 chances to read the question again, then you got SHOOOOOSH'd...  sounds fair to me.  Just admit you were wrong, and move on
Dave Greene,

This is not about victories. It is not about your pride. This is about helping others.

You are not the only expert alowed to post on this thread. If you don't think Chris will find my post of value, just leave it alone. Let Chris decide.

There is no reason to post inflamatory comments like "You are wrong" and "Now SHOOOSH". Especially since I was NOT wrong and have every right to post what I think is appropriate and addresses the question.

Gary
Avatar of GUEEN
I'd have to say that Gbaren believes in the concept of "TEAMWORK" which is what EE is based on.

Now again -->
The <PARAM> tag set properties of your control

Ciao~
>Bev

Even when proven to be wrong... you will not admit it.  I think your boastful pride is the reason we are where we are now.  You misread and over-simplified the question...  and yet still believe you are correct in your posts.  When proven wrong, I become your new victim in this holy crusade to keep things friendly here at EE.  I'm off this thread.  Now poor Chris has lost a true expert because of you.  Feel better now?   I'm sure he appreciates it!
Dave the intent was the lack of a "teamwork attitude" and the way you that you disrespected gbaren. And also a certain amount of "unprofessionalism" caught my eye . . .
Was he talking about himself? Well, whatever, the noise level is down at least.
As I understand it, it works like this (although I haven't tried it yet...just read about it last night):

<OBJECT ...>
<PARAM NAME="propertyname" VALUE="propertyvalue">
</OBJECT>

"propertyname" is the name of a property on the ActiveX control.
"propertyvalue" is a valid value that you want to assign to it.

(And Dave_Greene did have that somewhere in his long code listing, so points to him if it works.)
Avatar of cbonjovi

ASKER

OK Dave, you're perfect, sorry for the late.
OBJECT and PARAM tags aren't enough, 'cause it has to be something from VB side to catch the value (a COM interface I think..).
All is right until Step 14, that is works in a standard exe environment, but not in the browser with the html suggested, performing a message asking the permission to execute the control considered potentially dangerous.
Thank to all the EE.
It's a fantastic place where people could improve their capacities.
Your OCX's class, has statements like

Public Property Let X(s as string)
    m_x = s
End Property

You would set this property with:

<PARAM name="X" value="Your Value Here">

And that would set the initial value of the parameter.

The message you are getting is because the control isn't signed. To distribute ActiveX controls, you must purchase a certificate from VeriSign or another authority and sign the CAB file containing your control. When you purchase the certificate from VeriSign, they provide instructions on the signing procedure.

Gary
No Gary, it doesn't work.
Inserting the control in a .exe VB file I was able to set the property, but from html with the instruction you provide I wasn't.
Don't know why, I think this is the right way too.
Very strange
gbaren is correct regarding the signing and the param line.

If you'd like to read up about it, check out chapter 21 of the "teach yourself ActiveX Controls for VB6 in 21 Days" book.
cbonjovi,

I popped back in, didn't want to leave you hanging.. looks like you can use some more help.  Post your Usercontrol code and your html here, and we'll get it working.  One question... does the control show up in the browser?

cheers
also...

make sure you revisit number 12 just in case
12) Use the Package and Deployment wizard to build the deployment
- Using the "Internet Package" option
- Take the defaults until you get to the "Safety Settings" tab, you will select "NO" for Safe for Scripting, and "YES" for safe for initialization.

You may need to change your browser settings with regards to downloading unsigned controls...

In IE goto Internet options > Security > Internet
Choose custom level button and change the default setting
of "download unsigned ActiveX controls" to <Prompt>
Tomorrow, I intend to delete all non-technical posts in this question. Until then, I expect that no one will make anymore non-technical posts in this question.

cbonjovi: I apologize for the unprofessional behavior of some of the experts in this question.

amp
Community Support Moderator
Experts Exchange


Experts: Please see this https://www.experts-exchange.com/jsp/qShow.jsp?ta=commspt&qid=20138955
ping...
I followed with attention all the steps, but no way by html.
Post the control:


Dim Connected As Integer
Dim Var_gateway, Var_gatekeeper As String
Public ciccio As String

'Valori predefiniti propriet?:
Const m_def_BackColor = "0"
Const m_def_ForeColor = 0
Const m_def_Enabled = 0
Const m_def_BackStyle = 0
Const m_def_BorderStyle = 0
Const m_def_Gateway_prop = 0
'Variabili propriet?:
Dim m_BackColor As String
Dim m_ForeColor As Long
Dim m_Enabled As Boolean
Dim m_Font As Font
Dim m_BackStyle As Integer
Dim m_BorderStyle As Integer
Dim m_Gateway_prop As String
'Dichiarazioni di eventi:
Event Click()
Event DblClick()
Event KeyDown(KeyCode As Integer, Shift As Integer)
Event KeyPress(KeyAscii As Integer)
Event KeyUp(KeyCode As Integer, Shift As Integer)
Event MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Event MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Event MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

Private Sub UserControl_Initialize()


    ConnectButton.ApplySkin SkinForm1
    AnswerButton.ApplySkin SkinForm1
    HangupButton.ApplySkin SkinForm1
    SkinLabel1.ApplySkin SkinForm1
    Height = 2890
    Width = 4155
   

    ' These will be received by a event and added to the device list
    H3231.FastStart = False  ' per il CM 2.4
    H3231.JitterDelay = 100
    H3231.AutoAnswer = False  'importante
    H3231.SilenceDetection = False
   
    Call H3231.Listen
   
    If (Var_gatekeeper <> "") Then ' setup gatekeeper
        H3231.UseGateKeeper = True
        H3231.GateKeeper = Var_gatekeeper
        Call H3231.RegisterGatekeeper
    Else
        H3231.UseGateKeeper = False
    End If
   
    Call GUI_Disconnected
    MsgBox "finta"
       
End Sub
'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=13,0,0,0
Public Property Get BackColor() As String
    BackColor = m_BackColor
End Property

Public Property Let BackColor(ByVal New_BackColor As String)
    m_BackColor = New_BackColor
    PropertyChanged "BackColor"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=8,0,0,0
Public Property Get ForeColor() As Long
    ForeColor = m_ForeColor
End Property

Public Property Let ForeColor(ByVal New_ForeColor As Long)
    m_ForeColor = New_ForeColor
    PropertyChanged "ForeColor"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=0,0,0,0
Public Property Get Enabled() As Boolean
    Enabled = m_Enabled
End Property

Public Property Let Enabled(ByVal New_Enabled As Boolean)
    m_Enabled = New_Enabled
    PropertyChanged "Enabled"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=6,0,0,0
Public Property Get Font() As Font
    Set Font = m_Font
End Property

Public Property Set Font(ByVal New_Font As Font)
    Set m_Font = New_Font
    PropertyChanged "Font"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=7,0,0,0
Public Property Get BackStyle() As Integer
    BackStyle = m_BackStyle
End Property

Public Property Let BackStyle(ByVal New_BackStyle As Integer)
    m_BackStyle = New_BackStyle
    PropertyChanged "BackStyle"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=7,0,0,0
Public Property Get BorderStyle() As Integer
    BorderStyle = m_BorderStyle
End Property

Public Property Let BorderStyle(ByVal New_BorderStyle As Integer)
    m_BorderStyle = New_BorderStyle
    PropertyChanged "BorderStyle"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=5
Public Sub Refresh()
     
End Sub

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=14,0,0,0
Public Property Get Gateway_prop() As String
    Gateway_prop = m_Gateway_prop
    MsgBox "ciao1"
End Property

Public Property Let Gateway_prop(ByVal New_Gateway_prop As String)
    m_Gateway_prop = New_Gateway_prop
    ciccio = m_Gateway_prop
    MsgBox "ciao2"
    PropertyChanged "Gateway_prop"
   
End Property

'Inizializza le propriet? di UserControl.
Private Sub UserControl_InitProperties()
    m_BackColor = m_def_BackColor
    m_ForeColor = m_def_ForeColor
    m_Enabled = m_def_Enabled
    Set m_Font = Ambient.Font
    m_BackStyle = m_def_BackStyle
    m_BorderStyle = m_def_BorderStyle
    m_Gateway_prop = m_def_Gateway_prop
End Sub

'Carica i valori delle propriet? dalla posizione di memorizzazione.
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)

    m_BackColor = PropBag.ReadProperty("BackColor", m_def_BackColor)
    m_ForeColor = PropBag.ReadProperty("ForeColor", m_def_ForeColor)
    m_Enabled = PropBag.ReadProperty("Enabled", m_def_Enabled)
    Set m_Font = PropBag.ReadProperty("Font", Ambient.Font)
    m_BackStyle = PropBag.ReadProperty("BackStyle", m_def_BackStyle)
    m_BorderStyle = PropBag.ReadProperty("BorderStyle", m_def_BorderStyle)
    m_Gateway_prop = PropBag.ReadProperty("Gateway_prop", m_def_Gateway_prop)
End Sub

'Scrive i valori delle propriet? nella posizione di memorizzazione.
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)

    Call PropBag.WriteProperty("BackColor", m_BackColor, m_def_BackColor)
    Call PropBag.WriteProperty("ForeColor", m_ForeColor, m_def_ForeColor)
    Call PropBag.WriteProperty("Enabled", m_Enabled, m_def_Enabled)
    Call PropBag.WriteProperty("Font", m_Font, Ambient.Font)
    Call PropBag.WriteProperty("BackStyle", m_BackStyle, m_def_BackStyle)
    Call PropBag.WriteProperty("BorderStyle", m_BorderStyle, m_def_BorderStyle)
    Call PropBag.WriteProperty("Gateway_prop", m_Gateway_prop, m_def_Gateway_prop)
End Sub


and html now:

<HTML>
<HEAD>
<TITLE>SempliceActiveX.CAB</TITLE>
</HEAD>
<BODY>
<!--      Se per uno o pi? controlli inclusi in questa pagina ? necessario specificare la licenza,
      creare un file delle licenze. Eseguire LPK_TOOL.EXE per creare il
      file .lpk necessario. LPK_TOOL.EXE si trova in ActiveX SDK,
      all'indirizzo Internet http://www.microsoft.com/intdev/sdk/sdk.htm. ? inoltre disponibile nella directory \Tools\LPK_TOOL
      del CD di Visual Basic 6.0.

      Di seguito viene riportato un esempio di tag OBJECT:

<OBJECT CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331">
      <PARAM NAME="LPKPath" VALUE="LPKfilename.LPK">
</OBJECT>
-->

<OBJECT ID="Click"
CLASSID="CLSID:92DB2110-F7BD-11D4-B3CA-E0865BC10000"
CODEBASE="SempliceActiveX.CAB#version=1,0,0,0">
<PARAM NAME="Gateway_prop" VALUE="Test">
</OBJECT>
</BODY>
</HTML>



Object is made safe for initializing.
THANK YOU FOR YOUR HELP
I followed with attention all the steps, but no way by html.
Post the control:


Dim Connected As Integer
Dim Var_gateway, Var_gatekeeper As String
Public ciccio As String

'Valori predefiniti propriet?:
Const m_def_BackColor = "0"
Const m_def_ForeColor = 0
Const m_def_Enabled = 0
Const m_def_BackStyle = 0
Const m_def_BorderStyle = 0
Const m_def_Gateway_prop = 0
'Variabili propriet?:
Dim m_BackColor As String
Dim m_ForeColor As Long
Dim m_Enabled As Boolean
Dim m_Font As Font
Dim m_BackStyle As Integer
Dim m_BorderStyle As Integer
Dim m_Gateway_prop As String
'Dichiarazioni di eventi:
Event Click()
Event DblClick()
Event KeyDown(KeyCode As Integer, Shift As Integer)
Event KeyPress(KeyAscii As Integer)
Event KeyUp(KeyCode As Integer, Shift As Integer)
Event MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Event MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Event MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

Private Sub UserControl_Initialize()


    ConnectButton.ApplySkin SkinForm1
    AnswerButton.ApplySkin SkinForm1
    HangupButton.ApplySkin SkinForm1
    SkinLabel1.ApplySkin SkinForm1
    Height = 2890
    Width = 4155
   

    ' These will be received by a event and added to the device list
    H3231.FastStart = False  ' per il CM 2.4
    H3231.JitterDelay = 100
    H3231.AutoAnswer = False  'importante
    H3231.SilenceDetection = False
   
    Call H3231.Listen
   
    If (Var_gatekeeper <> "") Then ' setup gatekeeper
        H3231.UseGateKeeper = True
        H3231.GateKeeper = Var_gatekeeper
        Call H3231.RegisterGatekeeper
    Else
        H3231.UseGateKeeper = False
    End If
   
    Call GUI_Disconnected
    MsgBox "finta"
       
End Sub
'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=13,0,0,0
Public Property Get BackColor() As String
    BackColor = m_BackColor
End Property

Public Property Let BackColor(ByVal New_BackColor As String)
    m_BackColor = New_BackColor
    PropertyChanged "BackColor"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=8,0,0,0
Public Property Get ForeColor() As Long
    ForeColor = m_ForeColor
End Property

Public Property Let ForeColor(ByVal New_ForeColor As Long)
    m_ForeColor = New_ForeColor
    PropertyChanged "ForeColor"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=0,0,0,0
Public Property Get Enabled() As Boolean
    Enabled = m_Enabled
End Property

Public Property Let Enabled(ByVal New_Enabled As Boolean)
    m_Enabled = New_Enabled
    PropertyChanged "Enabled"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=6,0,0,0
Public Property Get Font() As Font
    Set Font = m_Font
End Property

Public Property Set Font(ByVal New_Font As Font)
    Set m_Font = New_Font
    PropertyChanged "Font"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=7,0,0,0
Public Property Get BackStyle() As Integer
    BackStyle = m_BackStyle
End Property

Public Property Let BackStyle(ByVal New_BackStyle As Integer)
    m_BackStyle = New_BackStyle
    PropertyChanged "BackStyle"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=7,0,0,0
Public Property Get BorderStyle() As Integer
    BorderStyle = m_BorderStyle
End Property

Public Property Let BorderStyle(ByVal New_BorderStyle As Integer)
    m_BorderStyle = New_BorderStyle
    PropertyChanged "BorderStyle"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=5
Public Sub Refresh()
     
End Sub

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=14,0,0,0
Public Property Get Gateway_prop() As String
    Gateway_prop = m_Gateway_prop
    MsgBox "ciao1"
End Property

Public Property Let Gateway_prop(ByVal New_Gateway_prop As String)
    m_Gateway_prop = New_Gateway_prop
    ciccio = m_Gateway_prop
    MsgBox "ciao2"
    PropertyChanged "Gateway_prop"
   
End Property

'Inizializza le propriet? di UserControl.
Private Sub UserControl_InitProperties()
    m_BackColor = m_def_BackColor
    m_ForeColor = m_def_ForeColor
    m_Enabled = m_def_Enabled
    Set m_Font = Ambient.Font
    m_BackStyle = m_def_BackStyle
    m_BorderStyle = m_def_BorderStyle
    m_Gateway_prop = m_def_Gateway_prop
End Sub

'Carica i valori delle propriet? dalla posizione di memorizzazione.
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)

    m_BackColor = PropBag.ReadProperty("BackColor", m_def_BackColor)
    m_ForeColor = PropBag.ReadProperty("ForeColor", m_def_ForeColor)
    m_Enabled = PropBag.ReadProperty("Enabled", m_def_Enabled)
    Set m_Font = PropBag.ReadProperty("Font", Ambient.Font)
    m_BackStyle = PropBag.ReadProperty("BackStyle", m_def_BackStyle)
    m_BorderStyle = PropBag.ReadProperty("BorderStyle", m_def_BorderStyle)
    m_Gateway_prop = PropBag.ReadProperty("Gateway_prop", m_def_Gateway_prop)
End Sub

'Scrive i valori delle propriet? nella posizione di memorizzazione.
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)

    Call PropBag.WriteProperty("BackColor", m_BackColor, m_def_BackColor)
    Call PropBag.WriteProperty("ForeColor", m_ForeColor, m_def_ForeColor)
    Call PropBag.WriteProperty("Enabled", m_Enabled, m_def_Enabled)
    Call PropBag.WriteProperty("Font", m_Font, Ambient.Font)
    Call PropBag.WriteProperty("BackStyle", m_BackStyle, m_def_BackStyle)
    Call PropBag.WriteProperty("BorderStyle", m_BorderStyle, m_def_BorderStyle)
    Call PropBag.WriteProperty("Gateway_prop", m_Gateway_prop, m_def_Gateway_prop)
End Sub


and html now:

<HTML>
<HEAD>
<TITLE>SempliceActiveX.CAB</TITLE>
</HEAD>
<BODY>
<!--      Se per uno o pi? controlli inclusi in questa pagina ? necessario specificare la licenza,
      creare un file delle licenze. Eseguire LPK_TOOL.EXE per creare il
      file .lpk necessario. LPK_TOOL.EXE si trova in ActiveX SDK,
      all'indirizzo Internet http://www.microsoft.com/intdev/sdk/sdk.htm. ? inoltre disponibile nella directory \Tools\LPK_TOOL
      del CD di Visual Basic 6.0.

      Di seguito viene riportato un esempio di tag OBJECT:

<OBJECT CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331">
      <PARAM NAME="LPKPath" VALUE="LPKfilename.LPK">
</OBJECT>
-->

<OBJECT ID="Click"
CLASSID="CLSID:92DB2110-F7BD-11D4-B3CA-E0865BC10000"
CODEBASE="SempliceActiveX.CAB#version=1,0,0,0">
<PARAM NAME="Gateway_prop" VALUE="Test">
</OBJECT>
</BODY>
</HTML>



Object is made safe for initializing.
THANK YOU FOR YOUR HELP
I followed with attention all the steps, but no way by html.
Post the control:


Dim Connected As Integer
Dim Var_gateway, Var_gatekeeper As String
Public ciccio As String

'Valori predefiniti propriet?:
Const m_def_BackColor = "0"
Const m_def_ForeColor = 0
Const m_def_Enabled = 0
Const m_def_BackStyle = 0
Const m_def_BorderStyle = 0
Const m_def_Gateway_prop = 0
'Variabili propriet?:
Dim m_BackColor As String
Dim m_ForeColor As Long
Dim m_Enabled As Boolean
Dim m_Font As Font
Dim m_BackStyle As Integer
Dim m_BorderStyle As Integer
Dim m_Gateway_prop As String
'Dichiarazioni di eventi:
Event Click()
Event DblClick()
Event KeyDown(KeyCode As Integer, Shift As Integer)
Event KeyPress(KeyAscii As Integer)
Event KeyUp(KeyCode As Integer, Shift As Integer)
Event MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Event MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Event MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

Private Sub UserControl_Initialize()


    ConnectButton.ApplySkin SkinForm1
    AnswerButton.ApplySkin SkinForm1
    HangupButton.ApplySkin SkinForm1
    SkinLabel1.ApplySkin SkinForm1
    Height = 2890
    Width = 4155
   

    ' These will be received by a event and added to the device list
    H3231.FastStart = False  ' per il CM 2.4
    H3231.JitterDelay = 100
    H3231.AutoAnswer = False  'importante
    H3231.SilenceDetection = False
   
    Call H3231.Listen
   
    If (Var_gatekeeper <> "") Then ' setup gatekeeper
        H3231.UseGateKeeper = True
        H3231.GateKeeper = Var_gatekeeper
        Call H3231.RegisterGatekeeper
    Else
        H3231.UseGateKeeper = False
    End If
   
    Call GUI_Disconnected
    MsgBox "finta"
       
End Sub
'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=13,0,0,0
Public Property Get BackColor() As String
    BackColor = m_BackColor
End Property

Public Property Let BackColor(ByVal New_BackColor As String)
    m_BackColor = New_BackColor
    PropertyChanged "BackColor"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=8,0,0,0
Public Property Get ForeColor() As Long
    ForeColor = m_ForeColor
End Property

Public Property Let ForeColor(ByVal New_ForeColor As Long)
    m_ForeColor = New_ForeColor
    PropertyChanged "ForeColor"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=0,0,0,0
Public Property Get Enabled() As Boolean
    Enabled = m_Enabled
End Property

Public Property Let Enabled(ByVal New_Enabled As Boolean)
    m_Enabled = New_Enabled
    PropertyChanged "Enabled"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=6,0,0,0
Public Property Get Font() As Font
    Set Font = m_Font
End Property

Public Property Set Font(ByVal New_Font As Font)
    Set m_Font = New_Font
    PropertyChanged "Font"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=7,0,0,0
Public Property Get BackStyle() As Integer
    BackStyle = m_BackStyle
End Property

Public Property Let BackStyle(ByVal New_BackStyle As Integer)
    m_BackStyle = New_BackStyle
    PropertyChanged "BackStyle"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=7,0,0,0
Public Property Get BorderStyle() As Integer
    BorderStyle = m_BorderStyle
End Property

Public Property Let BorderStyle(ByVal New_BorderStyle As Integer)
    m_BorderStyle = New_BorderStyle
    PropertyChanged "BorderStyle"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=5
Public Sub Refresh()
     
End Sub

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=14,0,0,0
Public Property Get Gateway_prop() As String
    Gateway_prop = m_Gateway_prop
    MsgBox "ciao1"
End Property

Public Property Let Gateway_prop(ByVal New_Gateway_prop As String)
    m_Gateway_prop = New_Gateway_prop
    ciccio = m_Gateway_prop
    MsgBox "ciao2"
    PropertyChanged "Gateway_prop"
   
End Property

'Inizializza le propriet? di UserControl.
Private Sub UserControl_InitProperties()
    m_BackColor = m_def_BackColor
    m_ForeColor = m_def_ForeColor
    m_Enabled = m_def_Enabled
    Set m_Font = Ambient.Font
    m_BackStyle = m_def_BackStyle
    m_BorderStyle = m_def_BorderStyle
    m_Gateway_prop = m_def_Gateway_prop
End Sub

'Carica i valori delle propriet? dalla posizione di memorizzazione.
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)

    m_BackColor = PropBag.ReadProperty("BackColor", m_def_BackColor)
    m_ForeColor = PropBag.ReadProperty("ForeColor", m_def_ForeColor)
    m_Enabled = PropBag.ReadProperty("Enabled", m_def_Enabled)
    Set m_Font = PropBag.ReadProperty("Font", Ambient.Font)
    m_BackStyle = PropBag.ReadProperty("BackStyle", m_def_BackStyle)
    m_BorderStyle = PropBag.ReadProperty("BorderStyle", m_def_BorderStyle)
    m_Gateway_prop = PropBag.ReadProperty("Gateway_prop", m_def_Gateway_prop)
End Sub

'Scrive i valori delle propriet? nella posizione di memorizzazione.
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)

    Call PropBag.WriteProperty("BackColor", m_BackColor, m_def_BackColor)
    Call PropBag.WriteProperty("ForeColor", m_ForeColor, m_def_ForeColor)
    Call PropBag.WriteProperty("Enabled", m_Enabled, m_def_Enabled)
    Call PropBag.WriteProperty("Font", m_Font, Ambient.Font)
    Call PropBag.WriteProperty("BackStyle", m_BackStyle, m_def_BackStyle)
    Call PropBag.WriteProperty("BorderStyle", m_BorderStyle, m_def_BorderStyle)
    Call PropBag.WriteProperty("Gateway_prop", m_Gateway_prop, m_def_Gateway_prop)
End Sub


and html now:

<HTML>
<HEAD>
<TITLE>SempliceActiveX.CAB</TITLE>
</HEAD>
<BODY>
<!--      Se per uno o pi? controlli inclusi in questa pagina ? necessario specificare la licenza,
      creare un file delle licenze. Eseguire LPK_TOOL.EXE per creare il
      file .lpk necessario. LPK_TOOL.EXE si trova in ActiveX SDK,
      all'indirizzo Internet http://www.microsoft.com/intdev/sdk/sdk.htm. ? inoltre disponibile nella directory \Tools\LPK_TOOL
      del CD di Visual Basic 6.0.

      Di seguito viene riportato un esempio di tag OBJECT:

<OBJECT CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331">
      <PARAM NAME="LPKPath" VALUE="LPKfilename.LPK">
</OBJECT>
-->

<OBJECT ID="Click"
CLASSID="CLSID:92DB2110-F7BD-11D4-B3CA-E0865BC10000"
CODEBASE="SempliceActiveX.CAB#version=1,0,0,0">
<PARAM NAME="Gateway_prop" VALUE="Test">
</OBJECT>
</BODY>
</HTML>



Object is made safe for initializing.
THANK YOU FOR YOUR HELP
I followed with attention all the steps, but no way by html.
Post the control:


Dim Connected As Integer
Dim Var_gateway, Var_gatekeeper As String
Public ciccio As String

'Valori predefiniti propriet?:
Const m_def_BackColor = "0"
Const m_def_ForeColor = 0
Const m_def_Enabled = 0
Const m_def_BackStyle = 0
Const m_def_BorderStyle = 0
Const m_def_Gateway_prop = 0
'Variabili propriet?:
Dim m_BackColor As String
Dim m_ForeColor As Long
Dim m_Enabled As Boolean
Dim m_Font As Font
Dim m_BackStyle As Integer
Dim m_BorderStyle As Integer
Dim m_Gateway_prop As String
'Dichiarazioni di eventi:
Event Click()
Event DblClick()
Event KeyDown(KeyCode As Integer, Shift As Integer)
Event KeyPress(KeyAscii As Integer)
Event KeyUp(KeyCode As Integer, Shift As Integer)
Event MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Event MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Event MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

Private Sub UserControl_Initialize()


    ConnectButton.ApplySkin SkinForm1
    AnswerButton.ApplySkin SkinForm1
    HangupButton.ApplySkin SkinForm1
    SkinLabel1.ApplySkin SkinForm1
    Height = 2890
    Width = 4155
   

    ' These will be received by a event and added to the device list
    H3231.FastStart = False  ' per il CM 2.4
    H3231.JitterDelay = 100
    H3231.AutoAnswer = False  'importante
    H3231.SilenceDetection = False
   
    Call H3231.Listen
   
    If (Var_gatekeeper <> "") Then ' setup gatekeeper
        H3231.UseGateKeeper = True
        H3231.GateKeeper = Var_gatekeeper
        Call H3231.RegisterGatekeeper
    Else
        H3231.UseGateKeeper = False
    End If
   
    Call GUI_Disconnected
    MsgBox "finta"
       
End Sub
'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=13,0,0,0
Public Property Get BackColor() As String
    BackColor = m_BackColor
End Property

Public Property Let BackColor(ByVal New_BackColor As String)
    m_BackColor = New_BackColor
    PropertyChanged "BackColor"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=8,0,0,0
Public Property Get ForeColor() As Long
    ForeColor = m_ForeColor
End Property

Public Property Let ForeColor(ByVal New_ForeColor As Long)
    m_ForeColor = New_ForeColor
    PropertyChanged "ForeColor"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=0,0,0,0
Public Property Get Enabled() As Boolean
    Enabled = m_Enabled
End Property

Public Property Let Enabled(ByVal New_Enabled As Boolean)
    m_Enabled = New_Enabled
    PropertyChanged "Enabled"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=6,0,0,0
Public Property Get Font() As Font
    Set Font = m_Font
End Property

Public Property Set Font(ByVal New_Font As Font)
    Set m_Font = New_Font
    PropertyChanged "Font"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=7,0,0,0
Public Property Get BackStyle() As Integer
    BackStyle = m_BackStyle
End Property

Public Property Let BackStyle(ByVal New_BackStyle As Integer)
    m_BackStyle = New_BackStyle
    PropertyChanged "BackStyle"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=7,0,0,0
Public Property Get BorderStyle() As Integer
    BorderStyle = m_BorderStyle
End Property

Public Property Let BorderStyle(ByVal New_BorderStyle As Integer)
    m_BorderStyle = New_BorderStyle
    PropertyChanged "BorderStyle"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=5
Public Sub Refresh()
     
End Sub

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=14,0,0,0
Public Property Get Gateway_prop() As String
    Gateway_prop = m_Gateway_prop
    MsgBox "ciao1"
End Property

Public Property Let Gateway_prop(ByVal New_Gateway_prop As String)
    m_Gateway_prop = New_Gateway_prop
    ciccio = m_Gateway_prop
    MsgBox "ciao2"
    PropertyChanged "Gateway_prop"
   
End Property

'Inizializza le propriet? di UserControl.
Private Sub UserControl_InitProperties()
    m_BackColor = m_def_BackColor
    m_ForeColor = m_def_ForeColor
    m_Enabled = m_def_Enabled
    Set m_Font = Ambient.Font
    m_BackStyle = m_def_BackStyle
    m_BorderStyle = m_def_BorderStyle
    m_Gateway_prop = m_def_Gateway_prop
End Sub

'Carica i valori delle propriet? dalla posizione di memorizzazione.
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)

    m_BackColor = PropBag.ReadProperty("BackColor", m_def_BackColor)
    m_ForeColor = PropBag.ReadProperty("ForeColor", m_def_ForeColor)
    m_Enabled = PropBag.ReadProperty("Enabled", m_def_Enabled)
    Set m_Font = PropBag.ReadProperty("Font", Ambient.Font)
    m_BackStyle = PropBag.ReadProperty("BackStyle", m_def_BackStyle)
    m_BorderStyle = PropBag.ReadProperty("BorderStyle", m_def_BorderStyle)
    m_Gateway_prop = PropBag.ReadProperty("Gateway_prop", m_def_Gateway_prop)
End Sub

'Scrive i valori delle propriet? nella posizione di memorizzazione.
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)

    Call PropBag.WriteProperty("BackColor", m_BackColor, m_def_BackColor)
    Call PropBag.WriteProperty("ForeColor", m_ForeColor, m_def_ForeColor)
    Call PropBag.WriteProperty("Enabled", m_Enabled, m_def_Enabled)
    Call PropBag.WriteProperty("Font", m_Font, Ambient.Font)
    Call PropBag.WriteProperty("BackStyle", m_BackStyle, m_def_BackStyle)
    Call PropBag.WriteProperty("BorderStyle", m_BorderStyle, m_def_BorderStyle)
    Call PropBag.WriteProperty("Gateway_prop", m_Gateway_prop, m_def_Gateway_prop)
End Sub


and html now:

<HTML>
<HEAD>
<TITLE>SempliceActiveX.CAB</TITLE>
</HEAD>
<BODY>
<!--      Se per uno o pi? controlli inclusi in questa pagina ? necessario specificare la licenza,
      creare un file delle licenze. Eseguire LPK_TOOL.EXE per creare il
      file .lpk necessario. LPK_TOOL.EXE si trova in ActiveX SDK,
      all'indirizzo Internet http://www.microsoft.com/intdev/sdk/sdk.htm. ? inoltre disponibile nella directory \Tools\LPK_TOOL
      del CD di Visual Basic 6.0.

      Di seguito viene riportato un esempio di tag OBJECT:

<OBJECT CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331">
      <PARAM NAME="LPKPath" VALUE="LPKfilename.LPK">
</OBJECT>
-->

<OBJECT ID="Click"
CLASSID="CLSID:92DB2110-F7BD-11D4-B3CA-E0865BC10000"
CODEBASE="SempliceActiveX.CAB#version=1,0,0,0">
<PARAM NAME="Gateway_prop" VALUE="Test">
</OBJECT>
</BODY>
</HTML>



Object is made safe for initializing.
THANK YOU FOR YOUR HELP
I followed with attention all the steps, but no way by html.
Post the control:


Dim Connected As Integer
Dim Var_gateway, Var_gatekeeper As String
Public ciccio As String

'Valori predefiniti propriet?:
Const m_def_BackColor = "0"
Const m_def_ForeColor = 0
Const m_def_Enabled = 0
Const m_def_BackStyle = 0
Const m_def_BorderStyle = 0
Const m_def_Gateway_prop = 0
'Variabili propriet?:
Dim m_BackColor As String
Dim m_ForeColor As Long
Dim m_Enabled As Boolean
Dim m_Font As Font
Dim m_BackStyle As Integer
Dim m_BorderStyle As Integer
Dim m_Gateway_prop As String
'Dichiarazioni di eventi:
Event Click()
Event DblClick()
Event KeyDown(KeyCode As Integer, Shift As Integer)
Event KeyPress(KeyAscii As Integer)
Event KeyUp(KeyCode As Integer, Shift As Integer)
Event MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Event MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Event MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

Private Sub UserControl_Initialize()


    ConnectButton.ApplySkin SkinForm1
    AnswerButton.ApplySkin SkinForm1
    HangupButton.ApplySkin SkinForm1
    SkinLabel1.ApplySkin SkinForm1
    Height = 2890
    Width = 4155
   

    ' These will be received by a event and added to the device list
    H3231.FastStart = False  ' per il CM 2.4
    H3231.JitterDelay = 100
    H3231.AutoAnswer = False  'importante
    H3231.SilenceDetection = False
   
    Call H3231.Listen
   
    If (Var_gatekeeper <> "") Then ' setup gatekeeper
        H3231.UseGateKeeper = True
        H3231.GateKeeper = Var_gatekeeper
        Call H3231.RegisterGatekeeper
    Else
        H3231.UseGateKeeper = False
    End If
   
    Call GUI_Disconnected
    MsgBox "finta"
       
End Sub
'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=13,0,0,0
Public Property Get BackColor() As String
    BackColor = m_BackColor
End Property

Public Property Let BackColor(ByVal New_BackColor As String)
    m_BackColor = New_BackColor
    PropertyChanged "BackColor"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=8,0,0,0
Public Property Get ForeColor() As Long
    ForeColor = m_ForeColor
End Property

Public Property Let ForeColor(ByVal New_ForeColor As Long)
    m_ForeColor = New_ForeColor
    PropertyChanged "ForeColor"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=0,0,0,0
Public Property Get Enabled() As Boolean
    Enabled = m_Enabled
End Property

Public Property Let Enabled(ByVal New_Enabled As Boolean)
    m_Enabled = New_Enabled
    PropertyChanged "Enabled"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=6,0,0,0
Public Property Get Font() As Font
    Set Font = m_Font
End Property

Public Property Set Font(ByVal New_Font As Font)
    Set m_Font = New_Font
    PropertyChanged "Font"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=7,0,0,0
Public Property Get BackStyle() As Integer
    BackStyle = m_BackStyle
End Property

Public Property Let BackStyle(ByVal New_BackStyle As Integer)
    m_BackStyle = New_BackStyle
    PropertyChanged "BackStyle"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=7,0,0,0
Public Property Get BorderStyle() As Integer
    BorderStyle = m_BorderStyle
End Property

Public Property Let BorderStyle(ByVal New_BorderStyle As Integer)
    m_BorderStyle = New_BorderStyle
    PropertyChanged "BorderStyle"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=5
Public Sub Refresh()
     
End Sub

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=14,0,0,0
Public Property Get Gateway_prop() As String
    Gateway_prop = m_Gateway_prop
    MsgBox "ciao1"
End Property

Public Property Let Gateway_prop(ByVal New_Gateway_prop As String)
    m_Gateway_prop = New_Gateway_prop
    ciccio = m_Gateway_prop
    MsgBox "ciao2"
    PropertyChanged "Gateway_prop"
   
End Property

'Inizializza le propriet? di UserControl.
Private Sub UserControl_InitProperties()
    m_BackColor = m_def_BackColor
    m_ForeColor = m_def_ForeColor
    m_Enabled = m_def_Enabled
    Set m_Font = Ambient.Font
    m_BackStyle = m_def_BackStyle
    m_BorderStyle = m_def_BorderStyle
    m_Gateway_prop = m_def_Gateway_prop
End Sub

'Carica i valori delle propriet? dalla posizione di memorizzazione.
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)

    m_BackColor = PropBag.ReadProperty("BackColor", m_def_BackColor)
    m_ForeColor = PropBag.ReadProperty("ForeColor", m_def_ForeColor)
    m_Enabled = PropBag.ReadProperty("Enabled", m_def_Enabled)
    Set m_Font = PropBag.ReadProperty("Font", Ambient.Font)
    m_BackStyle = PropBag.ReadProperty("BackStyle", m_def_BackStyle)
    m_BorderStyle = PropBag.ReadProperty("BorderStyle", m_def_BorderStyle)
    m_Gateway_prop = PropBag.ReadProperty("Gateway_prop", m_def_Gateway_prop)
End Sub

'Scrive i valori delle propriet? nella posizione di memorizzazione.
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)

    Call PropBag.WriteProperty("BackColor", m_BackColor, m_def_BackColor)
    Call PropBag.WriteProperty("ForeColor", m_ForeColor, m_def_ForeColor)
    Call PropBag.WriteProperty("Enabled", m_Enabled, m_def_Enabled)
    Call PropBag.WriteProperty("Font", m_Font, Ambient.Font)
    Call PropBag.WriteProperty("BackStyle", m_BackStyle, m_def_BackStyle)
    Call PropBag.WriteProperty("BorderStyle", m_BorderStyle, m_def_BorderStyle)
    Call PropBag.WriteProperty("Gateway_prop", m_Gateway_prop, m_def_Gateway_prop)
End Sub


and html now:

<HTML>
<HEAD>
<TITLE>SempliceActiveX.CAB</TITLE>
</HEAD>
<BODY>
<!--      Se per uno o pi? controlli inclusi in questa pagina ? necessario specificare la licenza,
      creare un file delle licenze. Eseguire LPK_TOOL.EXE per creare il
      file .lpk necessario. LPK_TOOL.EXE si trova in ActiveX SDK,
      all'indirizzo Internet http://www.microsoft.com/intdev/sdk/sdk.htm. ? inoltre disponibile nella directory \Tools\LPK_TOOL
      del CD di Visual Basic 6.0.

      Di seguito viene riportato un esempio di tag OBJECT:

<OBJECT CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331">
      <PARAM NAME="LPKPath" VALUE="LPKfilename.LPK">
</OBJECT>
-->

<OBJECT ID="Click"
CLASSID="CLSID:92DB2110-F7BD-11D4-B3CA-E0865BC10000"
CODEBASE="SempliceActiveX.CAB#version=1,0,0,0">
<PARAM NAME="Gateway_prop" VALUE="Test">
</OBJECT>
</BODY>
</HTML>



Object is made safe for initializing.
THANK YOU FOR YOUR HELP
I followed with attention all the steps, but no way by html.
Post the control:


Dim Connected As Integer
Dim Var_gateway, Var_gatekeeper As String
Public ciccio As String

'Valori predefiniti propriet?:
Const m_def_BackColor = "0"
Const m_def_ForeColor = 0
Const m_def_Enabled = 0
Const m_def_BackStyle = 0
Const m_def_BorderStyle = 0
Const m_def_Gateway_prop = 0
'Variabili propriet?:
Dim m_BackColor As String
Dim m_ForeColor As Long
Dim m_Enabled As Boolean
Dim m_Font As Font
Dim m_BackStyle As Integer
Dim m_BorderStyle As Integer
Dim m_Gateway_prop As String
'Dichiarazioni di eventi:
Event Click()
Event DblClick()
Event KeyDown(KeyCode As Integer, Shift As Integer)
Event KeyPress(KeyAscii As Integer)
Event KeyUp(KeyCode As Integer, Shift As Integer)
Event MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Event MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Event MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

Private Sub UserControl_Initialize()


    ConnectButton.ApplySkin SkinForm1
    AnswerButton.ApplySkin SkinForm1
    HangupButton.ApplySkin SkinForm1
    SkinLabel1.ApplySkin SkinForm1
    Height = 2890
    Width = 4155
   

    ' These will be received by a event and added to the device list
    H3231.FastStart = False  ' per il CM 2.4
    H3231.JitterDelay = 100
    H3231.AutoAnswer = False  'importante
    H3231.SilenceDetection = False
   
    Call H3231.Listen
   
    If (Var_gatekeeper <> "") Then ' setup gatekeeper
        H3231.UseGateKeeper = True
        H3231.GateKeeper = Var_gatekeeper
        Call H3231.RegisterGatekeeper
    Else
        H3231.UseGateKeeper = False
    End If
   
    Call GUI_Disconnected
    MsgBox "finta"
       
End Sub
'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=13,0,0,0
Public Property Get BackColor() As String
    BackColor = m_BackColor
End Property

Public Property Let BackColor(ByVal New_BackColor As String)
    m_BackColor = New_BackColor
    PropertyChanged "BackColor"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=8,0,0,0
Public Property Get ForeColor() As Long
    ForeColor = m_ForeColor
End Property

Public Property Let ForeColor(ByVal New_ForeColor As Long)
    m_ForeColor = New_ForeColor
    PropertyChanged "ForeColor"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=0,0,0,0
Public Property Get Enabled() As Boolean
    Enabled = m_Enabled
End Property

Public Property Let Enabled(ByVal New_Enabled As Boolean)
    m_Enabled = New_Enabled
    PropertyChanged "Enabled"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=6,0,0,0
Public Property Get Font() As Font
    Set Font = m_Font
End Property

Public Property Set Font(ByVal New_Font As Font)
    Set m_Font = New_Font
    PropertyChanged "Font"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=7,0,0,0
Public Property Get BackStyle() As Integer
    BackStyle = m_BackStyle
End Property

Public Property Let BackStyle(ByVal New_BackStyle As Integer)
    m_BackStyle = New_BackStyle
    PropertyChanged "BackStyle"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=7,0,0,0
Public Property Get BorderStyle() As Integer
    BorderStyle = m_BorderStyle
End Property

Public Property Let BorderStyle(ByVal New_BorderStyle As Integer)
    m_BorderStyle = New_BorderStyle
    PropertyChanged "BorderStyle"
End Property

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=5
Public Sub Refresh()
     
End Sub

'AVVISO: NON RIMUOVERE O MODIFICARE LE SEGUENTI RIGHE DI COMMENTO
'MemberInfo=14,0,0,0
Public Property Get Gateway_prop() As String
    Gateway_prop = m_Gateway_prop
    MsgBox "ciao1"
End Property

Public Property Let Gateway_prop(ByVal New_Gateway_prop As String)
    m_Gateway_prop = New_Gateway_prop
    ciccio = m_Gateway_prop
    MsgBox "ciao2"
    PropertyChanged "Gateway_prop"
   
End Property

'Inizializza le propriet? di UserControl.
Private Sub UserControl_InitProperties()
    m_BackColor = m_def_BackColor
    m_ForeColor = m_def_ForeColor
    m_Enabled = m_def_Enabled
    Set m_Font = Ambient.Font
    m_BackStyle = m_def_BackStyle
    m_BorderStyle = m_def_BorderStyle
    m_Gateway_prop = m_def_Gateway_prop
End Sub

'Carica i valori delle propriet? dalla posizione di memorizzazione.
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)

    m_BackColor = PropBag.ReadProperty("BackColor", m_def_BackColor)
    m_ForeColor = PropBag.ReadProperty("ForeColor", m_def_ForeColor)
    m_Enabled = PropBag.ReadProperty("Enabled", m_def_Enabled)
    Set m_Font = PropBag.ReadProperty("Font", Ambient.Font)
    m_BackStyle = PropBag.ReadProperty("BackStyle", m_def_BackStyle)
    m_BorderStyle = PropBag.ReadProperty("BorderStyle", m_def_BorderStyle)
    m_Gateway_prop = PropBag.ReadProperty("Gateway_prop", m_def_Gateway_prop)
End Sub

'Scrive i valori delle propriet? nella posizione di memorizzazione.
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)

    Call PropBag.WriteProperty("BackColor", m_BackColor, m_def_BackColor)
    Call PropBag.WriteProperty("ForeColor", m_ForeColor, m_def_ForeColor)
    Call PropBag.WriteProperty("Enabled", m_Enabled, m_def_Enabled)
    Call PropBag.WriteProperty("Font", m_Font, Ambient.Font)
    Call PropBag.WriteProperty("BackStyle", m_BackStyle, m_def_BackStyle)
    Call PropBag.WriteProperty("BorderStyle", m_BorderStyle, m_def_BorderStyle)
    Call PropBag.WriteProperty("Gateway_prop", m_Gateway_prop, m_def_Gateway_prop)
End Sub


and html now:

<HTML>
<HEAD>
<TITLE>SempliceActiveX.CAB</TITLE>
</HEAD>
<BODY>
<!--      Se per uno o pi? controlli inclusi in questa pagina ? necessario specificare la licenza,
      creare un file delle licenze. Eseguire LPK_TOOL.EXE per creare il
      file .lpk necessario. LPK_TOOL.EXE si trova in ActiveX SDK,
      all'indirizzo Internet http://www.microsoft.com/intdev/sdk/sdk.htm. ? inoltre disponibile nella directory \Tools\LPK_TOOL
      del CD di Visual Basic 6.0.

      Di seguito viene riportato un esempio di tag OBJECT:

<OBJECT CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331">
      <PARAM NAME="LPKPath" VALUE="LPKfilename.LPK">
</OBJECT>
-->

<OBJECT ID="Click"
CLASSID="CLSID:92DB2110-F7BD-11D4-B3CA-E0865BC10000"
CODEBASE="SempliceActiveX.CAB#version=1,0,0,0">
<PARAM NAME="Gateway_prop" VALUE="Test">
</OBJECT>
</BODY>
</HTML>



Object is made safe for initializing.
THANK YOU FOR YOUR HELP
Chris,

I see you ran into the net troubles last night too.

Before you get to the PARAM, try setting the property in BODY onLoad and retrieving it's value in a button onClick or something.

Also, keep in mind that you are assuming that your user has a VB runtime installed. That is most likely not your problem now, just something you should be aware of.

By the way, have you tried to use this control in VB? Does it work as expected?

Ciao,
Gary
Here's how:

1. Move <OBJECT> to <HEAD>
2. See <BODY onLoad>


<HTML>
<HEAD>
<TITLE>SempliceActiveX.CAB</TITLE>
<OBJECT ID="Click"
CLASSID="CLSID:92DB2110-F7BD-11D4-B3CA-E0865BC10000"
CODEBASE="SempliceActiveX.CAB#version=1,0,0,0">
<PARAM NAME="Gateway_prop" VALUE="Test">
</OBJECT>
</HEAD>
<BODY onLoad="Click.Gateway_prop=""Test2""";>
</BODY>
</HTML>

Another thing to make sure of:

Make sure "Binary Compatibility" is set in Project Properties/Component. If it is not, you are generating a new CLSID every time you compile.

If the setting is anything other than Binary Compatibility, set that, recompile, and get the new CLSID into the HTML.

Affermative, Binary Compatibility is already set.
Does the component show up on the page at all?
ASKER CERTIFIED SOLUTION
Avatar of Dave_Greene
Dave_Greene

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
OK, right Dave! Perfect with VB script, it works fine.
Thank you very very much.
Chris