15,900,724 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Use my saved
content filters
Ask a Question
All
Questions
All
Unanswered
FAQ
Sending SMS Through VB 6
Please
Sign up or sign in
to vote.
2.86/5 (4 votes)
See more:
VB
Hi All,
Regarding SMS, through VB6 application, how can we send the SMS where a SMS device is Connected to USB Port. Anybody having the information please let me know.
Regards,
Jay.
Posted
20-Jul-09 20:47pm
jayachandra.c
Add a Solution
5
solutions
Top Rated
Most Recent
Please
Sign up or sign in
to vote.
Solution 1
Accept Solution
Reject Solution
you will almost certainly need a third party library. I doubt anyone still writes or supports those for VB6 tho, given how out of date and obsolete it is
If VB6 can talk to a webservice, you may find a webservice you can use. I doubt it would be free.
Permalink
Share this answer
Posted
20-Jul-09 21:54pm
Christian Graus
Please
Sign up or sign in
to vote.
Solution 6
Accept Solution
Reject Solution
Imports System
Imports System.Threading
Imports System.ComponentModel
Imports System.IO.Ports
Public Class Form1
'connect your mobile/GSM modem to PC,
'then go in device manager and check under ports which COM port has been slected
'if say com1 is there then put com2 in following statement
Dim SMSEngine As New SMSCOMMS("COM19")
Dim i As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
SMSEngine.Open() 'open the port
SMSEngine.SendSMS() 'send the SMS
End Sub
End Class
Public Class SMSCOMMS
Private WithEvents SMSPort As SerialPort
Private SMSThread As Thread
Private ReadThread As Thread
Shared _Continue As Boolean = False
Shared _ContSMS As Boolean = False
Private _Wait As Boolean = False
Shared _ReadPort As Boolean = False
Public Event Sending(ByVal Done As Boolean)
Public Event DataReceived(ByVal Message As String)
Public Sub New(ByRef COMMPORT As String)
'initialize all values
SMSPort = New SerialPort
With SMSPort
.PortName = COMMPORT
.BaudRate = 19200
.Parity = Parity.None
.DataBits = 8
.StopBits = StopBits.One
.Handshake = Handshake.RequestToSend
.DtrEnable = True
.RtsEnable = True
.NewLine = vbCrLf
End With
End Sub
Public Function SendSMS() As Boolean
If SMSPort.IsOpen = True Then
'sending AT commands
SMSPort.WriteLine("AT")
SMSPort.WriteLine("AT+CMGF=1" & vbCrLf) 'set command message format to text mode(1)
SMSPort.WriteLine("AT+CSCA=""+919822078000""" & vbCrLf) 'set service center address (which varies for service providers (idea, airtel))
SMSPort.WriteLine("AT+CMGS= + TextBox1.text + " & vbCrLf) ' enter the mobile number whom you want to send the SMS
_ContSMS = False
SMSPort.WriteLine("+ TextBox1.text +" & vbCrLf & Chr(26)) 'SMS sending
MessageBox.Show(":send")
SMSPort.Close()
End If
End Function
Public Sub Open()
If Not (SMSPort.IsOpen = True) Then
SMSPort.Open()
End If
End Sub
Public Sub Close()
If SMSPort.IsOpen = True Then
SMSPort.Close()
End If
End Sub
End Class
Permalink
Share this answer
Posted
8-Feb-14 1:19am
SOHAM_GANDHI
Comments
CHill60
1-Mar-14 16:58pm
Off topic
Please
Sign up or sign in
to vote.
Solution 3
Accept Solution
Reject Solution
;P ;P ;P oh may god thats my midterm project her in sti
Permalink
Share this answer
Posted
17-Feb-10 14:11pm
rickazel
Please
Sign up or sign in
to vote.
Solution 4
Accept Solution
Reject Solution
Jay, why on earth would you use VB6 ? You realise it's obsolete, unsupported, and unlikely to lead to any sort of real career opportunities ?
Because of COM, you can do anything in VB6. The kicker is, VB6 itself is useless, it just knows how to talk to real languages.
Did they even have SMS when VB6 was made obsolete ?
Permalink
Share this answer
Posted
17-Feb-10 14:19pm
Christian Graus
Please
Sign up or sign in
to vote.
Solution 5
Accept Solution
Reject Solution
HI I have VB6 SMS Project Using GSM Modem....please contact boopasathya
Permalink
Share this answer
Posted
31-Mar-10 4:15am
wah2010
Comments
sameershik
22-Nov-11 1:24am
SENT ME SMS PROJECT chennaicity76@gmail.com
nuzleaf27
22-Aug-14 10:45am
hello. I have the same problem with jayachandra.c .
Can you send me your SMS Project?
nuzleaf.haste27@gmail.com
thank you
Member 9521715
25-Feb-17 7:18am
can you send me code of sms software at saaleh@tabeertours.com
Add a Solution
Add your solution here
B
I
U
S
small
BIG
code
Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML
var
<
>
&
link
[^]
encode
untab
case
indent
outdent
OK
Paste as
Strip HTML
Encode HTML
Paste as-is
Code block
Quoted Text
Best guess
To display as
The content must be between 30 and 50000 characters.
Treat my content as plain text, not as HTML
Preview
0
…
Existing Members
Sign in to your account
...or Join us
Download, Vote, Comment, Publish.
Your Email
Password
Forgot your password?
Your Email
This email is in use. Do you need your
password
?
Optional Password
I have read and agree to the
Terms of Service
and
Privacy Policy
Please subscribe me to the CodeProject newsletters
Submit your solution
When answering a question please:
Read the question carefully.
Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
If a question is poorly phrased then either ask for clarification, ignore it, or
edit the question
and fix the problem. Insults are not welcome.
Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Top Experts
Last 24hrs
This month
OriginalGriff
90
Pete O'Hanlon
75
M-Badger
10
Member 1408653
10
Member 16266627
10
Pete O'Hanlon
1,490
OriginalGriff
1,122
Richard MacCutchan
325
Richard Deeming
300
Dave Kreskowiak
280
Related Questions
Sending SMS with Confirmation
How to send SMS programmatically
sending sms
SMS SEND VB DOT NET CODE
Autoreplay SMS
Send/Receive SMS
WAY2SMS URI TO SEND SMS THROUGH MY VB APP.
Sending sms with GSM Modem in vb.net
Using Way2Sms URL For Sending Direct SMS Through VB Program
Bulk SMS problem, not send all sms
CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900