-
Feb 12th, 2013, 06:13 AM
#1
Thread Starter
Member
[RESOLVED] send sms from windows application
Hi,
I registered sms package from sms provider and they provided me with an api to send sms.
How to send sms in windows application vb.net using api ? Is it possible to send sms from windows app with internet connetion.
Please help its urgent
-
Feb 13th, 2013, 03:19 AM
#2
Thread Starter
Member
Re: send sms from windows application
OK, so put say one button, a webbrowser control (set visible to false), and 2 textboxs on a form, textbox1 will be number, textbox2 message
im assuming msisdn is the mobile number to send to and sid is what name it says on the phone
code under button (i havent tested so maybe a bug)
Code:
dim url as string
dim mnumber as string
dim message as string
if textbox1.text = "" then
msgbox("please enter number")
exit sub
elseif len(textbox1.text) < 10 then '10 length of mobile phone number
msgbox("please enter correct mobile number")
exit sub
elseif isnumeric(textbox1.text) then
if textbox2.text = "" then
msgbox("please enter a message")
exit sub
elseif len(textbox2.text) > 160 then
msgbox("please limit message to 160 characters")
exit sub
else
'do our code
mnumber = textbox1.text
message = textbox2.text
url = "http://thewebaddy.jsp/?usr=username&pass=password&msisdn=" & mnumber & "&sid=myname&msg=" & message
webbrowser1.navigate(url)
end if
else
msgbox("please enter only a number")
exit sub
end if
Got this reply from other post...
-
Feb 17th, 2013, 04:35 AM
#3
Re: [RESOLVED] send sms from windows application
Code:
Private Sub Command1_Click()
Select Case True
Case LenB(TextBox1) = 0&
MsgBox "Please enter the number!", vbExclamation
Case Len(TextBox1) < 10& '10 length of mobile phone number
MsgBox "Please enter correct mobile number length!", vbExclamation
Case IsNumeric(TextBox1)
Select Case Len(TextBox2)
Case 0&
MsgBox "Please enter your message!", vbExclamation
Case Is > 160&
MsgBox "Please limit message to 160 characters only!", vbExclamation
Case Else 'do our code
WebBrowser1.Navigate "http://thewebaddy.jsp/?usr=username&pass=password&msisdn=" _
& TextBox1 & "&sid=myname&msg=" & TextBox2
End Select
Case Else
MsgBox "Please enter numbers only!", vbExclamation
End Select
End Sub
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|