_Continue = True RaiseEvent Sending( True)Įnd If End While RaiseEvent DataReceived(SerialIn)Įnd If End While End Sub Public ReadOnly Property IsOpen() As Boolean Get If SMSPort.IsOpen = True Then _ContSMS = True End If If SerialIn.Contains( " +CMGS:") = True Then SMSPort.Read(RXBuffer, 0, SMSPort.ReadBufferSize) SMSPort.IsOpen = True) Then While SMSPort.BytesToRead 0 ReadThread = New Thread( AddressOf ReadPort)Įnd Sub Public Function SendSMS( ByVal CellNumber As String,īyVal SMSMessage As String) As Boolean Dim MyMessage As String = Nothing ' Check if Message Length 0) And ( Public Sub New( ByRef COMMPORT As String) Public Event DataReceived( ByVal Message As String) Shared _Continue As Boolean = False Shared _ContSMS As Boolean = False Private _Wait As Boolean = False Shared _ReadPort As Boolean = False Public Event Sending( ByVal Done As Boolean) Imports System.IO.PortsPublic Class SMSCOMMS If you are using VB.NET for coding the application, you can use the class shared by Jeanred.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |