VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Visual Basic .NET Sample: Send a Pager message through a hayes compatible, mobile phone. Mobile pho

by Jeremy (5 Submissions)
Category: OLE/COM/DCOM/Active-X
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 31st July 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Visual Basic .NET Sample: Send a Pager message through a hayes compatible, mobile phone. Mobile phone must support AT+C commands to send SMS

Rate Visual Basic .NET Sample: Send a Pager message through a hayes compatible, mobile phone. Mobile pho



' Download it from http://www.vahland.com/pub/asmsctrl.dll
' and register it on your machine.
' Then, choose 'Add Reference' from your Solutions Window,
' and add the ActiveSocket Type Library.

' Read http://www.vahland.com/pub/asmsctrl.htm for more info.

Imports ASMSCTRLLib

Module Module1

    Sub Main()

        Dim objSmsTool As ASMSCTRLLib.SMSC
        Dim strReceived As String
        Dim nCounter As Integer

        Console.WriteLine("Be sure To have the freeware asmsctrl.dll registered on your system,")
        Console.WriteLine("and add the 'ActiveXperts SMS and Pager Toolkit' to your references.")
        Console.WriteLine("")
        Console.WriteLine("This sample connects through a SMSC service provider to send out the SMS message")
        Console.WriteLine("Please check out www.activexperts.com/activsms/smsclist for a complete list of SMSC providers world wide")
        Console.WriteLine("")


        objSmsTool = New ASMSCTRLLib.SMSCClass()

        objSmsTool.PortID = 1
        objSmsTool.MessageText = "Hello, this is a test message"
        objSmsTool.Recipient = "0624896641"

        Console.WriteLine("Sending message...")

        objSmsTool.SendMessage(False)    ' TRUE means: through direct mobile phone

        If objSmsTool.LastError = 0 Then
            ' YES, connection established.
            Console.WriteLine("Message successfully delivered")
        Else
            Console.WriteLine("Message delivery failed, error: " + objSmsTool.LastError)
        End If

    End Sub

End Module

Download this snippet    Add to My Saved Code

Visual Basic .NET Sample: Send a Pager message through a hayes compatible, mobile phone. Mobile pho Comments

No comments have been posted about Visual Basic .NET Sample: Send a Pager message through a hayes compatible, mobile phone. Mobile pho. Why not be the first to post a comment about Visual Basic .NET Sample: Send a Pager message through a hayes compatible, mobile phone. Mobile pho.

Post your comment

Subject:
Message:
0/1000 characters