Results 1 to 3 of 3

Thread: callable COM objects

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2001
    Posts
    43

    Question callable COM objects

    Is it possible to pass properties from my ocx control to a bussiness component dll? If so can you shed some light on this subject for me?

  2. #2
    Fanatic Member
    Join Date
    Aug 2001
    Location
    Connecticut
    Posts
    855
    Pass a control reference to the dll:
    Client code:
    dim buisComponent as new myDll.buisComponent
    buisComponent.SomeFunction(controlName)

    Dll component code:
    Public Function SomeFunction(ByVal ctl As Object)
    if TypeOf ctl Is YourControl
    whatever = ctl.theProperty
    end if
    end function
    VB 6.0, Access, Sql server, Asp

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2001
    Posts
    43
    Here is my problem. I have an ocx control I created on a web page. This control has several checkboxes and comboboxes. I made my properties public so I can pass the values to my VBscript. Now I need my VBscript to call a component that will process these values. Here is some test code I used:

    The ocx control code:
    Event ClickMe()

    Private Sub cmdClick_Click()
    RaiseEvent ClickMe
    End Sub

    Public Property Get Caption1(ByVal Index As Integer) As Integer
    Caption1 = chkCaption1(Index).Value
    End Property

    The dll component code:
    Public Sub Output()
    If Options.Caption(1) = vbChecked Then
    MsgBox ("Hello")
    Else
    MsgBox ("Goodbye")
    End If
    End Sub

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