⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch26.htm

📁 MAPI__SAPI__TAPI
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<p>That gives you a good idea of how the support routines work and how they are used 
throughout the program. In the next section, you'll build a demonstration program that 
uses the tools you have reviewed so far. </p>

<h2><a NAME="LayingOuttheTAPILineForm"><font SIZE="5" COLOR="#FF0000">Laying Out the </font><tt><font
SIZE="5" COLOR="#FF0000" FACE="Courier">TAPILine</font></tt><font SIZE="5" COLOR="#FF0000"> 
Form</font></a></h2>

<p>For our example program, you'll build a form that has a series of buttons you can press 
to invoke various TAPI service requests. The status of your requests will be displayed in 
a scrollable text box on the form. In a real application, you'd capture the status 
information and use it to control program flow. But for now, you'll see each message sent 
back from TAPI and you'll see how you can write code to capture those messages. </p>

<p>First, start Visual Basic and open a new project. Then add the <tt><font FACE="Courier">TAPILINE.OCX</font></tt> 
control to the form. </p>
<div align="center"><center>

<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
  <tr>
    <td><b>Tip</b></td>
  </tr>
  <tr>
    <td><blockquote>
      <p>If you do not see the <tt><font FACE="Courier">TAPILINE.OCX</font></tt> in your Visual 
      Basic toolbox window, add it by using the <tt><font FACE="Courier">Tools | Custom Controls</font></tt> 
      menu option. For more information on adding the <tt><font FACE="Courier">TAPILINE.OCX</font></tt> 
      to your project see the <tt><font FACE="Courier">TAPILINE.OCX</font></tt> section of this 
      chapter. </p>
    </blockquote>
    </td>
  </tr>
</table>
</center></div>

<p>Next, add the <tt><font FACE="Courier">TAPILINE.BAS</font></tt> and <tt><font
FACE="Courier">TAPICALL.BAS</font></tt> modules to your project (<tt><font FACE="Courier">File 
| Add File...</font></tt>). You can find these in the <tt><font FACE="Courier">VBTAPI</font></tt> 
folder on the CD-ROM. </p>

<p>Now you're ready to place the controls on the form. Refer to Figure 26.4 and Table 26.4 
when laying out the form. </p>

<p><a HREF="f26-4.gif"><b>Figure 26.4 : </b><i>Laying out the TAPITest form </i></a><br>
</p>

<p align="center"><b>Table 26.4. The <tt><font FACE="Courier">TAPITest</font></tt> form 
controls.</b> </p>
<div align="center"><center>

<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
  <tr>
    <td><i>Control</i></td>
    <td WIDTH="129"><i>Property</i> </td>
    <td WIDTH="196"><i>Setting</i></td>
  </tr>
  <tr>
    <td WIDTH="215"><tt><font FACE="Courier">VB.Form</font></tt> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Name</font></tt></td>
    <td WIDTH="196"><tt><font FACE="Courier">frmTapiLine</font></tt> </td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Caption</font></tt> </td>
    <td WIDTH="196">&quot;Form1&quot;</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Height</font></tt> </td>
    <td WIDTH="196">6000</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Left</font></tt> </td>
    <td WIDTH="196">1035</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Top</font></tt> </td>
    <td WIDTH="196">1305</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Width</font></tt> </td>
    <td WIDTH="196">10260</td>
  </tr>
  <tr>
    <td WIDTH="215"><tt><font FACE="Courier">VB.CommandButton</font></tt> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Name</font></tt></td>
    <td WIDTH="196"><tt><font FACE="Courier">cmdLineConfProv</font></tt> </td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Caption</font></tt> </td>
    <td WIDTH="196">&quot;LineConfProv&quot;</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Height</font></tt> </td>
    <td WIDTH="196">450</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Left</font></tt> </td>
    <td WIDTH="196">2580</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">TabIndex</font></tt> </td>
    <td WIDTH="196">15</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Top</font></tt> </td>
    <td WIDTH="196">5040</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Width</font></tt> </td>
    <td WIDTH="196">1200</td>
  </tr>
  <tr>
    <td WIDTH="215"><tt><font FACE="Courier">VB.CommandButton</font></tt> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Name</font></tt></td>
    <td WIDTH="196"><tt><font FACE="Courier">cmdLineDeallocate</font></tt> </td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Caption</font></tt> </td>
    <td WIDTH="196">&quot;LineDealloc&quot;</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Height</font></tt> </td>
    <td WIDTH="196">450</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Left</font></tt> </td>
    <td WIDTH="196">7620</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">TabIndex</font></tt> </td>
    <td WIDTH="196">14</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Top</font></tt> </td>
    <td WIDTH="196">4500</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Width</font></tt> </td>
    <td WIDTH="196">1200</td>
  </tr>
  <tr>
    <td WIDTH="215"><tt><font FACE="Courier">VB.CommandButton</font></tt> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Name</font></tt></td>
    <td WIDTH="196"><tt><font FACE="Courier">cmdLineGetInfo</font></tt> </td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Caption</font></tt> </td>
    <td WIDTH="196">&quot;LineGetInfo&quot;</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Height</font></tt> </td>
    <td WIDTH="196">450</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Left</font></tt> </td>
    <td WIDTH="196">1320</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">TabIndex</font></tt> </td>
    <td WIDTH="196">13</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Top</font></tt> </td>
    <td WIDTH="196">5040</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Width</font></tt> </td>
    <td WIDTH="196">1200</td>
  </tr>
  <tr>
    <td WIDTH="215"><tt><font FACE="Courier">VB.CommandButton</font></tt> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Name</font></tt></td>
    <td WIDTH="196"><tt><font FACE="Courier">cmdLineShowHandles</font></tt> </td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Caption</font></tt> </td>
    <td WIDTH="196">&quot;Show Handles&quot;</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Height</font></tt> </td>
    <td WIDTH="196">450</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Left</font></tt> </td>
    <td WIDTH="196">60</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">TabIndex</font></tt> </td>
    <td WIDTH="196">12</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Top</font></tt> </td>
    <td WIDTH="196">5040</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Width</font></tt> </td>
    <td WIDTH="196">1200</td>
  </tr>
  <tr>
    <td WIDTH="215"><tt><font FACE="Courier">VB.TextBox</font></tt> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Name</font></tt></td>
    <td WIDTH="196">Text1</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">BackColor</font></tt> </td>
    <td WIDTH="196">&amp;H00C0C0C0&amp;</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Font</font></tt> </td>
    <td WIDTH="196">name=&quot;MS LineDraw&quot;</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"> </td>
    <td WIDTH="196">charset=2 </td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"> </td>
    <td WIDTH="196">weight=400 </td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"> </td>
    <td WIDTH="196">size=8.25 </td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"> </td>
    <td WIDTH="196">underline=0 'False </td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"> </td>
    <td WIDTH="196">italic=0 'False </td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"> </td>
    <td WIDTH="196">strikethrough=0 'False </td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE="Courier">Height</font></tt> </td>
    <td WIDTH="196">3915</td>
  </tr>
  <tr>
    <td WIDTH="215"> </td>
    <td WIDTH="129"><tt><font FACE=

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -