Check SMS balance with VB.NET

Integrating check SMS balance feature is easy when using iSMS API. Below is an example of integrating iSMS features in your VB.NET application.

To understand more about our iSMS API Key features, please visit our Developer API page.


All available features and configurations will be displayed at the iSMS Developer API page. Integrate our SMS API into your VB.NET application and enjoy our SMS services.



Download VB.NET Demo Files

Please click below to find out about other programming language samples.



1. First of all, user will able to see this form as illustration 1. This form is to check balance on their bulksms account.


Check SMS balance with VB.net


2. User have to key in their username and password and click on "Check Balance" button to proceed.


Check SMS balance with VB.net


3. After clicked on "Check Balance" button user will able to see their balance as illustration 3 below. And clear button is pop out. This button purpose is to clear form.


Check SMS balance with VB.net


4. To check next account balance, user can click on clear to clear form or direct key in username and password to proceed. As user want to check balance have to go through from step 1 to 2.


Check SMS balance with VB.net


5. Error Message will show up as illustration 5 below. When user did not click on anything and direct press on "Check Balance" button. Click on "OK" to continue.


Check SMS balance with VB.net



Below is some sample script for your reference.


Imports System
Imports System.Uri
Imports System.Net
Imports System.IO
Imports System.Data
Imports System.Windows.Forms
Imports System.Text



Public Class isms_balance
'This is a function when user has clicked on button check'
Private Sub btnCheck_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCheck.Click
'Checking if user leave blank on username and password space'
If (txtPass.Text() & txtUser.Text() <> "") Then
'Creating a uri'
Dim url As New Uri("http://isms.com.my/isms_balance.php?un=" + txtUser.Text + "&pwd=" + txtPass.Text)
'Creating a variable for WebRequest'
Dim req As WebRequest
req = WebRequest.Create(url)
'Creating a variable for WebResponse'
Dim resp As WebResponse
'Try and catch clause, to catch if there is error'
Try
resp = req.GetResponse()
Dim reader As StreamReader
reader = New StreamReader(resp.GetResponseStream())
Dim balance_str As String = Trim(reader.ReadToEnd.Trim())
resp.Close()
'Getting user balance into a label'
lblGetBal.Text = balance_str
req = Nothing
Catch ex As Exception
'If get error system will pop-out a message'
req = Nothing
MsgBox(ex.Message)
End Try
txtPass.Clear()
txtUser.Clear()
txtUser.Focus()
btnClear.Visible = True
btnClear.Enabled = True
Else
'A message box will appear when username and password is blank'
MessageBox.Show("Please enter your Username and Password", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
txtUser.Focus()
lblGetBal.Text = ""
btnClear.Visible = True
End If
End Sub
'A Clear button to let user clear our previous checked balance'
Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
txtPass.Clear()
txtUser.Clear()
lblGetBal.Text = ""
End Sub
End Class

Please click below to download demo files:


Download VB.NET Demo Files


Other Contact Methods

For further enquiries, please contact us via our contact page or the information below:

E-mail | sales@mobiweb.com.my

Note to registered users: Please include your Username in the email.

If operators are busy, please call the next number below.


Phone Numbers:

  • 1800 87 7061 (Malaysia Toll Free)
  • +604-642 0621 (Penang, Malaysia)
  • +603-2780 3880 (Line 1 Kuala Lumpur, Malaysia)
  • +603-7980 1388 (Line 2 Kuala Lumpur, Malaysia)
  • +6017-9713727 (Kelantan, Malaysia)
  • +6017-511 8885 (Johor Bahru, Malaysia)
  • +65 8301 0483 (Singapore)
  • +66 2026 0321 (Thailand)
  • +63 9212 358008 (Philippines)
  • +612 8310 5560 (Australia)

Fax:

  • +604-646 8367 (Penang, Malaysia)
  • +603-7980 2388 (Kuala Lumpur, Malaysia)

Articles

 

SMS Coverage for All Countries Worldwide

A B C D E F G H I J K L M N O P Q R S T U V Y Z
divider