guys why do i always get this error (Invalid use of property) in this code?
<code>
ctrl1.SetTransferMethod ("TCP")
</code>
thanks guys!
Printable View
guys why do i always get this error (Invalid use of property) in this code?
<code>
ctrl1.SetTransferMethod ("TCP")
</code>
thanks guys!
what is your ctrl1?
I have no idea what ctrl1 is supposed to be but I can tell you that is not how you assign a property in VB
To assign "TCP" to a property it would be coded like
using () implies that you are callign a function that will be returning a value or a sub routine us the Call methodCode:ctrl1.SetTransferMethod ="TCP"
well ctrl1 is an activeX control Im trying to use to access an IP Camera. I've tried what you said Data but it throws an error "Argument not optional" ?
Did you create the "SetTransferMethod" as a property for your control, or is in an intrinsic method of it? All my searches for that term turn up zip. if it's a method, what is the type argument required. But, your first post seemed to indicate that you created a property for your control, hence would have given you that first type error. Can you show more code, and describe what ctrl1 is?
PS. Just before you start typing "TCP" right after you type the parenthesis after ...method, what does it prompt you for for the type argument? A string, like you typed, or some other type?
ahm it is name for the control Im trying to use. the control is part of an SDK. I don't yet have much codes coz I'm just about to start it and when I do i got this error. Let me illustrate a part of the SDK describing "SetTransferMethod".
"SetTransferMethod = To set the transfer method. Parameter is transfer method. Remarks: Transfer Method=[ TCP | UDP ]."
P.S. It is expecting a string like SetTransferMethod(TransferMethod as String) as Long.
So that would be something like
Code:Dim ReturnVal as Long
ReturnVal=ControlName.SetTransferMethod("TCP")
oh that'd do the trick. thanks DataMiser! :)