receive sms using vb6(codes)

Reply

Join Date: Oct 2006
Posts: 10
Reputation: yanz is an unknown quantity at this point 
Solved Threads: 0
yanz yanz is offline Offline
Newbie Poster

receive sms using vb6(codes)

 
0
  #1
Nov 5th, 2006
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
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: receive sms using vb6(codes)

 
0
  #2
Nov 6th, 2006
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
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 1
Reputation: roeyco81 is an unknown quantity at this point 
Solved Threads: 0
roeyco81 roeyco81 is offline Offline
Newbie Poster

Re: receive sms using vb6(codes)

 
0
  #3
Sep 3rd, 2009
No Success of adding these lines, Any one can help Finishing Yanz's code?
P L E A S E
Reply With Quote Quick reply to this message  
Reply

Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC