C
CSharp
C++
Java
Visual Basic
HTML - CSS
Android
Asp
Asp.Net
Php
Python
JavaScript
SQL
XML
Assembly
ActiveX
API
Code Snippets
Database
Files Directories Drives
Forms
Graphics Games
Multimedia
Strings
Windows and Controls
More...
Visual Basic > Applications VBA sample source codes
Visual Basic Code > use the PhoneDailer in VB
use the PhoneDailer in VB 'Phone Dialer in VB 'make a new project; 2 textboxen (index 0 & 1); 2 labels (index 0 & 1) '1 command button 'Insert the next code in the right place (use Insert/File) 'Press F5 ------------- code ------------------- Option Explicit Private Declare Function tapiRequestMakeCall& Lib "TAPI32.DLL" (ByVal DestAdress$, ByVal AppName$, ByVal CalledParty$, ByVal Comment$) Private sub ChooseNumber(strNumber as String, strAppName as String, strName as String) dim lngResult as Long dim strBuffer as String lngResult = tapiRequestMakeCall&(strNumber, strAppName, strName, "") If lngResult <> 0 Then 'error strBuffer = "Error connecting to number: " select case lngResult case -2& strBuffer = strBuffer & " 'PhoneDailer not installed?" case -3& strBuffer = strBuffer & "Error : " & CStr(lngResult) & "." end Select MsgBox strBuffer end If End Sub Private sub Command1_Click() Call ChooseNumber(Text1(0).Text, "PhoneDialer", Text1(1).Text) End Sub Private sub Form_Load() Text1(0).Text = "" Text1(1).Text = "" End Sub Private sub Form_Unload(Cancel as Integer) End End Sub Return
Privacy Policy
|
Contact
|
Advertising
|
Link to Us
|
Directory