comboy
Instructor
- May 23, 2003
- 226
Hi All,
I'm trying to design a sms application, I've done most of the work in that it can send sms both in plain and pdu mode but I'm stuck on one thing, getting the AT command responses once the send message button is clicked to show on a label on the application form itself.
I've written a procedure that will capture the respose from the serial port class to a class level string variable called response and the responses do show up on a message box but I can't seem to get the same text to show on the label.
I'm new at VB so if I'm asking a silly question sorry just looking for a solution as I can't find exactly what I'm looking for via Google.
I'm trying to design a sms application, I've done most of the work in that it can send sms both in plain and pdu mode but I'm stuck on one thing, getting the AT command responses once the send message button is clicked to show on a label on the application form itself.
I've written a procedure that will capture the respose from the serial port class to a class level string variable called response and the responses do show up on a message box but I can't seem to get the same text to show on the label.
Code:
Private sub dataReceived (ByVal sender as Object, ByVal e As SerialDataReceivedEventArgs) Handels sPort.DataReceived
dim receivedDataLenght As Long
Try
response = sPort.ReadExisting
receivedDataLenght += response.Length
MsgBox("Received: " & response)
Catch ex As Exception
MsgBox (ex.ToString)
End Try
End Sub
I'm new at VB so if I'm asking a silly question sorry just looking for a solution as I can't find exactly what I'm looking for via Google.