We Value Your Privacy

We and our partners use technology such as cookies on our site to personalise content and ads, provide social media features, and analyse our traffic. Click below to consent to the use of this technology across the web. You can change your mind and change your consent choices at anytime by returning to this site.

Update Consent
Loading ...

How to Make Telephone Calls With Visual Basic

Updated July 20, 2017

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.

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

  2. 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.

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

  4. Imports System.Windows.Forms

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

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

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

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

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

  10. phoneNum = Trim(TextBox1.Text)

  11. Copy and paste the following to check for errors:

  12. End Class

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

Loading ...

Things You'll Need

  • Microsoft Visual Basic Express

About the Author

Jaime Avelar is a professional writer whose programming articles appear on various websites. He has been a software programmer since 2000. Avelar holds a Master of Science in information systems from the University of Texas at Arlington.

Loading ...