DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: How to Send SMS through ur Windows Application

  1. #1
    Join Date
    Mar 2006
    Posts
    9

    How to Send SMS through ur Windows Application

    hi every body,
    here is a program to Send SMS from a windows Apllication
    the code is very easy to understand

    there is the code(enjoy):



    but I have a small problem:
    when I put the code in a module an error appeared saying:

    Code:
    Additional information: It is invalid to start a second message loop on a single thread. Use Application.RunDialog or Form.ShowDialog instead.
    and when I put the same Code in a button,an other error appeared sayiny:

    Code:
    Additional information: It is invalid to start a second message loop on a single thread. Use Application.RunDialog or Form.ShowDialog instead.
    also,when I tried to register the ASMS.dll file using regsvr32 command an error appeared saying:

    Code:
    C:\WINDOWS\system32\ASmsCtrl.dll was loaded but the dllregister server entry piont was not found,the file cannot be registered
    SO what is the problem???

    the code that i used:

    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

    the application and the DLL file are attached

    Please help me???
    Attached Files Attached Files

  2. #2
    Join Date
    Mar 2006
    Posts
    9

    please help as soon as you can!!

    Please Experts......Help

    it is urgent!!


    I'm waiting for your answers!!!!

  3. #3
    Join Date
    May 2006
    Posts
    3
    This is just a general idea, since i haven't had a chance to try the dll and app yet.

    1. What version of .NET / Visual Studio are you using?

    2. If you're putting the code in a button, make the following changes to your code:

    Imports ASMSCTRLLib

    ^^^ Move this ^^^ to the top of your source file with any other Imports statements.

    Module Module1
    Sub Main()

    ^^^ Remove these lines ^^^

Similar Threads

  1. send long sms via gsm modem
    By swy456 in forum Mobile
    Replies: 15
    Last Post: 06-13-2018, 03:54 AM
  2. Replies: 0
    Last Post: 03-23-2006, 12:29 PM
  3. Send SMS
    By albinjoseph in forum Java
    Replies: 3
    Last Post: 08-29-2005, 02:38 AM
  4. Replies: 1
    Last Post: 09-26-2002, 07:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center