CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 1999
    Location
    India, TamilNadu, Chennai.
    Posts
    269

    Send SMS to mobile

    Dear All,


    How to send SMS from VB .Net to mobile device.

    I had some sample code but, it refers sms.dll win32 api where can i found this file.

    Thanks
    K.Babu
    Please avoid sending emails to my personal mail:
    write your doubts as thread in Codeguru
    Crystal Reports Forum
    .

    This will help all people having similar matters, and will let people who know solutions on the specific topic
    share their knowledge.

    Visit my company web site (Qmax Test Equipments Private Limited)

    Yours friendly,
    K.Babu

  2. #2
    Join Date
    Feb 2000
    Location
    OH - USA
    Posts
    1,892
    Code:
        ' You need the freeware ASMSCTRL.DLL to run the sample.
        ' 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 = 3
        objSmsTool.MessageText = "Hello, this is a test message"
        objSmsTool.Recipient = "0624896641"
        objSmsTool.ProviderDialString = "0,0653141414" ' The SMSC provider
        Console.WriteLine("Sending message...")
        objSmsTool.SendMessage(True)' TRUE means: through service provider
        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
    
    
    //************************************** // // Name: SMS message sample code // Description:Send an SMS message throu // gh SMSC service provider. There are hund // reds of SMSC service providers all over // the world // By: Rowen VanderLaan //**************************************
    Good Luck,
    Craig - CRG IT Solutions - Microsoft Gold Partner

    -My posts after 08/2015 = .NET 4.x and Visual Studio 2015
    -My posts after 11/2011 = .NET 4.x and Visual Studio 2012
    -My posts after 02/2010 = .NET 4.0 and Visual Studio 2010
    -My posts after 12/2007 = .NET 3.5 and Visual Studio 2008
    -My posts after 04/2007 = .NET 3.0 and Visual Studio 2005
    -My posts before 04/2007 = .NET 1.1/2.0

    *I do not follow all threads, so if you have a secondary question, message me.

  3. #3
    Join Date
    Aug 1999
    Location
    India, TamilNadu, Chennai.
    Posts
    269

    Send SMS to Mobile

    1. PortID property not available in asmsctrl class.

    2. Available Device property to set the device name. like "COM 1","COM 2".

    But we are not using modem, we using router with ISDN line throught LAN connection, assigned with Gateway address.

    so, what should i enter the device property.

    Thanks,
    K.Babu

    Originally posted by Craig Gemmill
    Code:
        ' You need the freeware ASMSCTRL.DLL to run the sample.
        ' 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 = 3
        objSmsTool.MessageText = "Hello, this is a test message"
        objSmsTool.Recipient = "0624896641"
        objSmsTool.ProviderDialString = "0,0653141414" ' The SMSC provider
        Console.WriteLine("Sending message...")
        objSmsTool.SendMessage(True)' TRUE means: through service provider
        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
    Please avoid sending emails to my personal mail:
    write your doubts as thread in Codeguru
    Crystal Reports Forum
    .

    This will help all people having similar matters, and will let people who know solutions on the specific topic
    share their knowledge.

    Visit my company web site (Qmax Test Equipments Private Limited)

    Yours friendly,
    K.Babu

  4. #4
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    263
    according to the site that dll comes from , you need a modem to use it. here's a quote from the product overview page ...
    You just need a standard Hayes compatible modem (no GSM) to send SMS/Pager messages through a provider.
    string Signature = Censored;

  5. #5
    Join Date
    Sep 2002
    Location
    Africa
    Posts
    147
    You can also use a mobile phone connected to your PC through blue tooth or a serial cable or even infra red I guess. I have successfully used blue tooth.
    Jesus died for my sin and now I am free

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured