Problem using Received Method with Active X (General questions)
Received event problem with wodTelnetDLX Active X 25-05-2006 08:21
I'm trying to log data from the terminal as it is received. It would appear the only way to do this is to use The Received Method.
When I try to use it with the Active X I get the following message:
Procedure declaration does not match description of event or procedure having the same name.
Private Sub wod1_Received()
Dim s As String
s = wod1.Receive
....
This seems to work for the wodTelnetDLXCom but not for the Active X
Re: Problem using Received Method with Active X
Hi Vincent,
I tried with the code you gave me, and it gave me the same error. You can try this code:
------------------------------
Private Sub wodTelnetDLX1_Received(ByVal ByteCount As Integer, Handled As Boolean)
Dim s As String
s = wodTelnetDLX1.Receive
End Sub
------------------------------
Hope this helps.
Regards,
Alan
Re: Problem using Received Method with Active X
I get data passed to the variable s but no data shows up on the terminal. If I pass the data to a MsgBox I can get both.
I tried setting Handled to False but it doesn't work.
Can you help?
Re: Problem using Received Method with Active X
Hi,
Yes, my last code will eat received lines.
When something comes to recive we can either show in ActiveX window or catch it on different way.
But you can do this, for example:
[code]
Private Sub wodTelnetDLX1_Received(ByVal ByteCount As Integer, Handled As Boolean)
Dim s As String
s = wodTelnetDLX1.Receive
wodTelnetDLX1.PrintText (s)
Text1.Text = Text1.Text & s
End Sub[/code]
Hope this will help and resolve your problems.
Regards,
Alan
Re: Problem using Received Method with Active X
You example works perfectly and I tested it against a True VT100 device and it seem to update properly.
I don't understand what the PrintText(s) is doing other than printing the text back to the terminal. Either way I an very happy at this point and can move forward. So far I am impressed with your company and your support.