954,517 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

send sms from pc to mobile in vb.net

hello. is ther anyone who can help me in vb.net? topic is how to send sms from pc to mobile...
thanks!


preci:-|

preci_gonzales
Newbie Poster
1 post since Jan 2007
Reputation Points: 10
Solved Threads: 0
 

You can send e-mails to each carrier's phone. Check out http://www.livejournal.com/tools/textmessage.bml?mode=details

Dukane
Posting Whiz in Training
295 posts since Oct 2006
Reputation Points: 45
Solved Threads: 29
 

Friend is one, who
F-inds you in a
R-ush of people,
I-nspires you to do something in life, Catches your
E-motions and
N-ever leaves you till
D-eath…

Kingafridi89
Newbie Poster
1 post since Jun 2010
Reputation Points: 10
Solved Threads: 0
 

Hi,

You can find some information, here.

Luc001
Posting Whiz
376 posts since Mar 2010
Reputation Points: 85
Solved Threads: 98
 

oee kali k gardai ho ani khana khako ta ......ani aaja call gar6au ta hau.......balaka chohi..........

nhushan
Newbie Poster
1 post since Jul 2010
Reputation Points: 10
Solved Threads: 0
 
hello. is ther anyone who can help me in vb.net? topic is how to send sms from pc to mobile... thanks! preci:-|


gertert:)

away007
Newbie Poster
1 post since Jul 2010
Reputation Points: 10
Solved Threads: 0
 

Thanks technology &dani also

deresa
Newbie Poster
2 posts since Dec 2010
Reputation Points: 10
Solved Threads: 0
 

It our best model

deresa
Newbie Poster
2 posts since Dec 2010
Reputation Points: 10
Solved Threads: 0
 

hiiiiiiiiiiiiiiiiiiiiiiiiiii

saniya00000
Newbie Poster
1 post since Feb 2011
Reputation Points: 10
Solved Threads: 0
 
Option Explicit On

Imports System
Imports System.Threading
Imports System.ComponentModel
Imports System.IO.Ports

Public Class form1



    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.load


    End Sub


    Private WithEvents SMSPort As SerialPort

    Private SMSThread As Thread
    Private ReadThread As Thread
    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)
    Public Event DataReceived(ByVal Message As String)

    Public Sub New(ByRef COMMPORT As String)
        SMSPort = New SerialPort
        With SMSPort
            .PortName = COMMPORT
            .BaudRate = 9600
            .Parity = Parity.None
            .DataBits = 8
            .StopBits = StopBits.One
            .Handshake = Handshake.RequestToSend
            .DtrEnable = True
            .RtsEnable = True
            .NewLine = vbCrLf
        End With
        ReadThread = New Thread(AddressOf ReadPort)
    End Sub

    Public Function SendSMS(ByVal CellNumber As String, ByVal SMSMessage As String) As Boolean
        Dim MyMessage As String = Nothing
        'Check if Message Length <= 160

        If SMSMessage.Length <= 160 Then
            MyMessage = SMSMessage
        Else
            MyMessage = Mid(SMSMessage, 1, 160)
        End If
        If IsOpen = True Then
            SMSPort.WriteLine("AT+CMGS=" & CellNumber & vbCr)
            _ContSMS = False
            SMSPort.WriteLine(MyMessage & vbCrLf & Chr(26))
            _Continue = False
            RaiseEvent Sending(False)
        End If
    End Function

    Private Sub ReadPort()
        Dim SerialIn As String = Nothing
        Dim RXBuffer(SMSPort.ReadBufferSize) As Byte
        Dim SMSMessage As String = Nothing
        Dim Strpos As Integer = 0
        Dim TmpStr As String = Nothing

        While SMSPort.IsOpen = True
            If (SMSPort.BytesToRead <> 0) And (SMSPort.IsOpen = True) Then
                While SMSPort.BytesToRead <> 0
                    SMSPort.Read(RXBuffer, 0, SMSPort.ReadBufferSize)
                    SerialIn = SerialIn & System.Text.Encoding.ASCII.GetString(RXBuffer)
                    If SerialIn.Contains(">") = True Then
                        _ContSMS = True
                    End If
                    If SerialIn.Contains("+CMGS:") = True Then
                        _Continue = True
                        RaiseEvent Sending(True)
                        _Wait = False
                        SerialIn = String.Empty
                        ReDim RXBuffer(SMSPort.ReadBufferSize)
                    End If
                End While
                RaiseEvent DataReceived(SerialIn)
                SerialIn = String.Empty
                ReDim RXBuffer(SMSPort.ReadBufferSize)
            End If
        End While
    End Sub

    Public ReadOnly Property IsOpen() As Boolean
        Get
            If SMSPort.IsOpen = True Then
                IsOpen = True
            Else
                IsOpen = False
            End If
        End Get
    End Property

    Public Sub Open()
        If IsOpen = False Then
            SMSPort.Open()
            ReadThread.Start()
        End If
    End Sub

    Public Sub Close()
        If IsOpen = True Then
            'SMSPort = New SMSCOMMS("COM1")
            'SMSEngine.Open()
            'SMSEngine.SendSMS("919888888888", "SMS Testing")
            'SMSEngine.Close()

            SMSPort.Close()
        End If
    End Sub

End Class


'

nikiskay
Newbie Poster
3 posts since Jul 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You