How to Make Telephone Calls With Visual Basic

Written by jaime avelar
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Make Telephone Calls With Visual Basic
Automate telephone calls with VB.NET. (telephone image by MATTHIEU FABISIAK from Fotolia.com)

Having the knowledge of how to make telephone calls from a Microsoft Visual Basic.NET (VB.NET) application can save you time if you need to make calls continuously. VB.NET is a computer programming language used to create mobile, Web and desktop applications. Making telephone calls from VB.NET can be accomplished using the Telephony Application Programming Interface (TAPI). TAPI gives the programmers the layers needed to access the Microsoft Telephony DLLs (dynamic link libraries). Telephony integrates computers with devices such as cameras and Internet networks.

Start Microsoft Visual Basic Express, click "New Project..." on the left pane of your screen and select "Windows Forms Application." Click "OK."

Double-click "Button" on the "Toolbox" to add a new button. Double-click "Label" to add a label. Add a second label using the same process. Double-click "TextBox" to add a text box.

Double-click "Button1" to open the "Form1.vb"module. Copy and paste the following in the very first line of the module:

Imports System.Windows.Forms

Copy and paste the following to declare the TAPI32 DLL under "Public Class Form1" but above the "Button1_Click" procedure:

The "Button1_Click" procedure was created when you double-clicked "Button1" on your Form.

Copy and paste the following inside the "Button1_Click" procedure to create your variables:

The "Button1_Click" procedure was created when you double-clicked "Button1" on your Form.

Copy and paste the following to get the phone number entered in the text box and call it:

phoneNum = Trim(TextBox1.Text)

Copy and paste the following to check for errors:

End Class

Press "F5" to run your program, then enter a phone number in the text box and click "Button1."

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.