Hi, i'm currently on a project about Computer connected to gsm modem and phone.

i need to recieve the sms from gsm modem and extract out to my GUI using VB6

I tot of using the 'Pulling' or 'Interrupt' method but both i also cannot use due to wrong codes.

the wrong codes is shown below. hope someone can edit or provide a better code

--pulling--

If Instr(MSComm1.InBufferCount, ">") >= 1 Then
MSComm1.Output = "AT+CMGF=" & "msgnum" & vbCr
A = 0
Do
DoEvents
A = A + 1
C = MSComm1.Input
ArrivedMsg.Text = C
If A = 2000 Then
Exit Do
End If
Loop Until InStr(C,">")
End If

---Interupt---

Select Case MSComm1.CommEvent
Case comEvRecieve
If(MSComm1.InBufferCount) >= 2 Then
MSComm1.Input = "AT+CMGR=" & "msgnum" & vbCr
C = MSComm1.Input
ArrivedMsg.Text = C
End If
End Select
----------


i'm super lousy at receiving part and currently keep looking thru sample to get better. pls someone out there help urgent thx =)