Results 1 to 2 of 2

Thread: return value to activex

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Posts
    1

    return value to activex

    hi
    i try to set the captio of a button while setting the <param name..
    . But it doesn´t work. here is my code. thaks for help!

    eric

    Const constBtnCaption = "CONST"
    Public mButtonCaption As String
    'Public ButtoAs String
    Option Explicit

    Public Sub UserDocument_ReadProperties(PropBag As PropertyBag)
    myBtnCaption = PropBag.ReadProperty("ButtonCaption", constBtnCaption)
    End Sub

    Public Property Get ButtonCaption() As String
    ButtonCaption = myBtnCaption
    End Property

    Public Property Let ButtonCaption(ByVal NewButtoncaption As String)
    ButtonCaption = NewButtoncaption
    PropertyChanged "ButtonCaption"
    End Property

    Private Sub Command1_Click()
    Command1.Caption = myBtnCaption
    End Sub


    'HTML

    <HTML>
    <HEAD>
    <TITLE>Projekt1.CAB</TITLE>
    </HEAD>
    <BODY>
    <OBJECT ID="UserControl1"
    CLASSID="CLSID:A64D3A24-79BA-4F68-813A-D3BFAFA893CF"
    CODEBASE="Projekt1.ocx">
    <PARAM NAME="ButtonCaption" VALUE="yeah">
    </OBJECT>
    </BODY>
    </HTML>

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    wrong

    Public Property Let ButtonCaption(ByVal NewButtoncaption As String)
    ButtonCaption = NewButtoncaption
    PropertyChanged "ButtonCaption"
    End Property


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

    Public Property Let ButtonCaption(ByVal NewButtoncaption As String)
    myBtnCaption = NewButtoncaption
    PropertyChanged "ButtonCaption"
    End Property
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width