CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 30 of 30
  1. #16
    Join Date
    Nov 2007
    Posts
    11

    Re: I have a project on visual basic-sms

    oh wad i mean is when i send a format like (table for (2-8)-daniel) . my program will auto reply with a table no. to e customer via this format (Daniel your table no. 2 had been reserves. Table reservation will be void in 3 hours). if wrong format is send it will reply wrong format please send your sms in this format (table for (2-8)-(name)).

  2. #17
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: I have a project on visual basic-sms

    Hmmm. I wonder if I didn't have the modem driver installed when I installed vb? I didn't need it, so I waited for a few weeks. Otherwise the only other difference is that this is XP Media Center 2005 where it was XP Pro before.

    EDIT: Just looked at an old backup. The same file is there. I might have installed it myself before also. Very strange indeed.
    Last edited by dglienna; November 29th, 2007 at 08:48 PM.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #18
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: I have a project on visual basic-sms

    @David: **** happens. Don't forget: It's Windows.

    Ok, Jason.
    Your format table (2-8) meaning for 2 persons at 8 o'clock?
    Well to get started I will send you later this day some cleaned up version of your program which we both can run to make things easier with finding errors, right?

  4. #19
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: I have a project on visual basic-sms

    So here it comes.
    Please look at what I did. I put all port opening in Form_Load().
    If you set the constant #Wof to 0 your settings are chosen. I can adapt by setting Wof to 1 when I have to try out stuff with my modem.
    I have written a small routine GetModemResponse.
    Look in Command1_Click() and Command2_Click() how it is used.
    You might use it wherever an answer from the modem is waited for.

    Only drawback is, my SMS terminal can send SMS, but cannot receive'm. So I can only simulate the receiving part here.
    Attached Files Attached Files

  5. #20
    Join Date
    Nov 2007
    Posts
    11

    Re: I have a project on visual basic-sms

    what i mean is when i send a even no. to this hp no. it will reply me with a table no. example- Daniel table for 4. then it will reply your table no() is being reserve. if wrong format is send it will reply with sorry wrong format inserted.

  6. #21
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: I have a project on visual basic-sms

    Yes? What's the problem?
    You have managed to communicate with the modem.
    I don't know how your modem works. Possibly you'd have to poll if an SMS has been received.
    If so, you have already the routine to read the message. Just put it into a separate sub.
    Then check the contents of the text for your desired syntax.
    Are you having problems with string functions?
    You wanted a format like: Name, #of persons
    So you make an array, split up the message at the "," and analyse it
    Code:
    dim reply$()
    reply = Split(LCase$(sms$, ","))
    'now reply(0) would contain the name, reply(1) the number of persons
    If UBound(reply)<1 Then 'wrong format, no comma
    If val(reply(1)) =0 Then 'error number of persons not recognized
    That should give you an idea...

  7. #22
    Join Date
    Nov 2007
    Posts
    11

    Re: I have a project on visual basic-sms

    Sorry i dun see any different in the project that you pass to mi
    Private Sub Command1_Click()

    Dim FromModem As String

    MSComm1.Output = "AT+CNMI=0,1,0,0,0" + vbCr
    FromModem = GetModemResponse
    Picture1.Cls
    Picture1.Print FromModem

    MSComm1.Output = "AT+CMGF=1" + vbCr
    FromModem = GetModemResponse
    Picture1.Print FromModem


    If MSComm1.InBufferCount > 0 Then Picture1.Print GetModemResponse

    Private Sub Command2_Click()

    Dim FromModem As String

    MSComm1.Output = "AT+CMGR=" + Text1.Text + vbCr
    Sleep 500
    FromModem = GetModemResponse
    Picture1.Cls
    Picture1.Print FromModem

  8. #23
    Join Date
    Nov 2007
    Posts
    11

    Re: I have a project on visual basic-sms

    i also face another proplem is when i run the program it have a error with the com port

  9. #24
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: I have a project on visual basic-sms

    What kind of error is it? You need to be more specific for anybody to be able to help you.

    As I recall you'd have to go to the Form_Load() and adapt the settings of the MSComm to your individual needs...

  10. #25
    Join Date
    Nov 2007
    Posts
    11

    Re: I have a project on visual basic-sms

    ok i am getting to understand this... sorry coz i am quite a newbie in this.
    dim reply$()
    reply = Split(LCase$(sms$, ","))
    'now reply(0) would contain the name, reply(1) the number of persons
    If UBound(reply)<1 Then 'wrong format, no comma
    If val(reply(1)) =0 Then 'error number of persons not recognized
    the code that u gave me.
    i create a new timer and paste it in. Is it correct but it aint replying me at all.
    so what muz i do to make it happen my deadline in almost
    nez week i will be dead

  11. #26
    Join Date
    Aug 2006
    Location
    Hubli, India
    Posts
    70

    Re: I have a project on visual basic-sms

    Quote Originally Posted by dglienna
    Odd. I just installed VB6 a month ago, with SP6, and now I find I don't have mscomm32.ocx installed! Don't know what happened, but I found it in an old folder. You can download it with any vb6 app that uses a modem.

    The SMS program has other problems. A module is likely missing.
    Code:
    Set SMS_Conn = New Shared_Connections
    Set SMS_Server = SMS_Conn.GetHandle
    Sorry Friends,
    Just Remove those two lines
    Code:
    Set SMS_Conn = New Shared_Connections
    Set SMS_Server = SMS_Conn.GetHandle
    And the sample will work.
    1. The sample displays all the messages received in a grid.
    2. you can select a message on the grid and click read particular message

    and i am sorry as it was a sample programme, I missed many details there
    for example to send the SMS

    Set the Caption of the TO Label with a mobile number to send
    type the message and click send , There the SMS goes .

    Sorry.

  12. #27
    Join Date
    Apr 2013
    Posts
    5

    visual basic-sms - HELP

    Hello WoF

    Regarding VB6 and SMS

    I need to contact you, I didn't found any way to send you a private message to you on this forum. Please email me at ... [email address removed]



    Kind regards
    Last edited by DataMiser; April 25th, 2013 at 03:28 PM.

  13. #28
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: I have a project on visual basic-sms

    If you have a question then you should start a thread of your own rather than post in one that is several years old, also you should not post your email address in the public areas, unless of course you like to get spam.
    Always use [code][/code] tags when posting code.

  14. #29
    Join Date
    Apr 2013
    Posts
    5

    Re: I have a project on visual basic-sms

    Thank you for the email removing ! I tried it but without sucess.
    I tried to contact a member that I think has the solution for my problem.

    Kind regards

    I'll start a new thread to know if someone can help me !
    Regards

  15. #30
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: I have a project on visual basic-sms

    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Page 2 of 2 FirstFirst 12

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