944,132 Members | Top Members by Rank

Ad:
Nov 5th, 2006
0

receive sms using vb6(codes)

Expand Post »
Hi everyOne..currently I m dOing my final yr project...I haf sOme cOdes attached..coz i realli don nOe how to continue...can anyone help mi...

Thanks!! The one is bold is where i got stuck..

Thanks alot!!!



Codes
Private Sub cmdSendMesg_Click()
' Set up the communications port
MSComm1.CommPort = 1 ' Com Port 1

' Set for 9600 baud, no parity, 8 data, and 1 stop bit.
MSComm1.Settings = "9600,N,8,1"

' Tell the control to read entire buffer when Input is used
MSComm1.InputLen = 0

' Open the port
MSComm1.PortOpen = True

' Send an 'AT' command to the phone
MSComm1.Output = "AT" & Chr$(13)
' The phone will respond with an 'OK'

' Set up the phone for a text message
MSComm1.Output = "AT+CMGF=1" & Chr$(13)
' The phone will respond with an 'OK'

' new mesg indication automatically send to pc, and not saved new mesg to sim/phone memory
MSComm1.Output = "AT+CNMI=1,2,0,0,0 " & Chr$(13)

(THIS IS WHERE I AM STUCK; dont know what to write next..)


' Close the port
MSComm1.PortOpen = False

End Sub
Reply With Quote
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
yanz is offline Offline
10 posts
since Oct 2006
Nov 6th, 2006
0

Re: receive sms using vb6(codes)

Hi.
Give this code from where u r stuck.

MSComm1.Input
Do
DoEvents
Buffer$ = Buffer$ & MSComm1.Input
Loop Until InStr(Buffer$, "OK" & vbCrLf)
' Read the "OK" response data in the serial port.
' Close the serial port.
MSComm1.PortOpen = False

Regards
Veena
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006
Sep 3rd, 2009
0

Re: receive sms using vb6(codes)

No Success of adding these lines, Any one can help Finishing Yanz's code?
P L E A S E
Reputation Points: 10
Solved Threads: 0
Newbie Poster
roeyco81 is offline Offline
1 posts
since Sep 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Change Crystal OLE path?
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Datagrid and Ado problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC