Click to See Complete Forum and Search --> : callable COM objects
bezeredi
Nov 16th, 2001, 03:20 PM
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?
ralph
Nov 16th, 2001, 10:42 PM
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
bezeredi
Nov 18th, 2001, 01:27 PM
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
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.