Click here to Skip to main content
15,888,816 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Here's my code:
VB
Private Sub frmRecieveSMS_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Using commPort As IO.Ports.SerialPort = My.Computer.Ports.OpenSerialPort("COM8", 9600)
        'display all SMS in my textbox named tbMessages
        commPort.Write("AT+CMGL=""ALL""" & vbCrLf & Chr(34))
        tbMessage.Text = commPort.ReadExisting
    End Using
End Sub


This will display all messages from my SIM(i guess).

1. the problem is how will my tbMessage.text be updated when i will receive an incoming message? please help guys ! :(

2. How will i get each SMS message and place it in a list? i dont know how to implement it because i don't know where to stop on each SMS message. thanks guys :)

im dying already, i felt my head is bursting :(
Posted
Updated 1-Jul-14 2:04am
v2
Comments
[no name] 1-Jul-14 15:54pm    
And is there some reason that you are not using the DataReceived event?

you can use timer and put some iterval like 20 seconds
so code will execute every 20 seconds
you can check status or execute what ever logic yout required !!
 
Share this answer
 
thanks for the reply sir, but Wouldn't that be too long sir if i want to update my tbMessage every 20 seconds just to see new sms message, if possible i want to see real time who send a message, :)
 
Share this answer
 
Comments
Blutfaust 1-Jul-14 15:37pm    
Please use the "Have a Question or Comment"-Button to reply to solutions.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900