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

📄 ch36.htm

📁 MAPI__SAPI__TAPI
💻 HTM
📖 第 1 页 / 共 5 页
字号:

<hr>

<p>That's all you need to add to the BAS module of the Talk Mail project. Be sure to save 
this file under the name <tt><font FACE="Courier">LIBTMAIL.BAS</font></tt> and the project 
under the name <tt><font FACE="Courier">TALKMAIL.VBP</font></tt> before continuing. </p>

<h2><b><a NAME="ThetmViewForm"><font SIZE="5" COLOR="#FF0000">The </font><tt><font
SIZE="5" COLOR="#FF0000" FACE="Courier">tmView</font></tt><font SIZE="5" COLOR="#FF0000"> 
Form</font></a></b></h2>

<p>The main form shows a list of all the Talk Mail messages in the user's inbox. It also 
has a set of toolbar buttons for performing the basic MAPI actions of logon, logoff, 
viewing the address book, creating a new Talk Mail message, reading an Existing Talk Mail 
message, and deleting a Talk Mail message. There are also buttons for adjusting the list 
view from large icon, small icon, list, and detail formats. </p>

<h3><b><a NAME="LayingOuttmView">Laying Out <tt><font SIZE="4" FACE="Courier">tmView</font></tt></a></b> 
</h3>

<p>The first step is to lay out the form's controls. Refer to Table 36.1 and Figure 36.1 
for details on the layout of the <tt><font FACE="Courier">tmView</font></tt> form. </p>

<p><a HREF="f36-1.gif"><b>Figure 36.1 : </b><i>Laying out the tmView form.</i></a> <br>
</p>

<p align="center"><b>Table 36.1. The tmView form controls.</b> </p>
<div align="center"><center>

<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
  <tr>
    <td><i>Control</i></td>
    <td WIDTH="128"><i>Property</i> </td>
    <td WIDTH="124"><i>Setting</i></td>
  </tr>
  <tr>
    <td WIDTH="217">VB.Form</td>
    <td WIDTH="128">Name</td>
    <td WIDTH="124">frmTMView </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Caption</td>
    <td WIDTH="124">&quot;Form1&quot; </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Height</td>
    <td WIDTH="124">4410 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Left</td>
    <td WIDTH="124">1185 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Top</td>
    <td WIDTH="124">1665 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Width</td>
    <td WIDTH="124">8715 </td>
  </tr>
  <tr>
    <td WIDTH="217">MSComDlg.CommonDialog</td>
    <td WIDTH="128">Name </td>
    <td WIDTH="124">CMDialog1</td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Left</td>
    <td WIDTH="124">6360 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Top</td>
    <td WIDTH="124">2880 </td>
  </tr>
  <tr>
    <td WIDTH="217">ComctlLib.StatusBar</td>
    <td WIDTH="128">Name</td>
    <td WIDTH="124">StatusBar1</td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Align</td>
    <td WIDTH="124">2 'Align Bottom </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Height</td>
    <td WIDTH="124">315 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Left</td>
    <td WIDTH="124">0 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">TabIndex</td>
    <td WIDTH="124">2 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Top</td>
    <td WIDTH="124">3405 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Width</td>
    <td WIDTH="124">8595 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">AlignSet</td>
    <td WIDTH="124">-1 'True </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">SimpleText</td>
    <td WIDTH="124">&quot;&quot; </td>
  </tr>
  <tr>
    <td WIDTH="217">ComctlLib.ImageList</td>
    <td WIDTH="128">Name</td>
    <td WIDTH="124">imglstSmall</td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Left</td>
    <td WIDTH="124">3720 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Top</td>
    <td WIDTH="124">1440 </td>
  </tr>
  <tr>
    <td WIDTH="217">ComctlLib.ImageList</td>
    <td WIDTH="128">Name</td>
    <td WIDTH="124">imglstBig</td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Left</td>
    <td WIDTH="124">3900 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Top</td>
    <td WIDTH="124">660 </td>
  </tr>
  <tr>
    <td WIDTH="217">ComctlLib.ImageList</td>
    <td WIDTH="128">Name</td>
    <td WIDTH="124">imglstToolBar</td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Left</td>
    <td WIDTH="124">5040 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Top</td>
    <td WIDTH="124">120 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">ImageWidth</td>
    <td WIDTH="124">16 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">ImageHeight</td>
    <td WIDTH="124">16 </td>
  </tr>
  <tr>
    <td WIDTH="217">ComctlLib.Toolbar</td>
    <td WIDTH="128">Name</td>
    <td WIDTH="124">tbrMain</td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Align</td>
    <td WIDTH="124">1 'Align Top </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Height</td>
    <td WIDTH="124">390 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Left</td>
    <td WIDTH="124">0 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">TabIndex</td>
    <td WIDTH="124">1 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Top</td>
    <td WIDTH="124">0 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Width</td>
    <td WIDTH="124">8595 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">ImageList</td>
    <td WIDTH="124">&quot;&quot; </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">AlignSet</td>
    <td WIDTH="124">-1 'True </td>
  </tr>
  <tr>
    <td WIDTH="217">ComctlLib.ListView</td>
    <td WIDTH="128">Name</td>
    <td WIDTH="124">ListView1</td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Height</td>
    <td WIDTH="124">2295 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Left</td>
    <td WIDTH="124">120 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">TabIndex</td>
    <td WIDTH="124">0 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Top</td>
    <td WIDTH="124">480 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Width</td>
    <td WIDTH="124">8355 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">appearance</td>
    <td WIDTH="124">1 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Arrange</td>
    <td WIDTH="124">2 </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">Icons</td>
    <td WIDTH="124">&quot;ImageList3&quot; </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">SmallIcons</td>
    <td WIDTH="124">&quot;ImageList2&quot; </td>
  </tr>
  <tr>
    <td WIDTH="217"> </td>
    <td WIDTH="128">View</td>
    <td WIDTH="124">2 </td>
  </tr>
</table>
</center></div>

<p>The form doesn't look like much at first, but you'll add all the fancy stuff (bitmaps, 
icons, and so on) at runtime. Once you get the controls onto the form, you need to build 
the menu. Figure 36.2 and Table 36.2 show you the details of the menu layout. </p>

<p><a HREF="f36-2.gif"><b>Figure 36.2 : </b><i>Laying out the tmView menu.</i></a> </p>
<div align="center"><center>

<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
  <tr>
    <td><b>Tip</b></td>
  </tr>
  <tr>
    <td><blockquote>
      <p>The menu layout makes extensive use of menu arrays. Be sure to pay close attention to 
      the index number values when building the menu. You'll use these index values throughout 
      the program.</p>
    </blockquote>
    </td>
  </tr>
</table>
</center></div>

<p align="center"><b>Table 36.2. The <tt><font FACE="Courier">tmView</font></tt> form 
menu.</b> </p>
<div align="center"><center>

<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
  <tr>
    <td><i>Menu Level</i></td>
    <td WIDTH="90"><i>Properties</i> </td>
    <td WIDTH="192"><i>Settings</i></td>
  </tr>
  <tr>
    <td WIDTH="121">Top</td>
    <td WIDTH="90"><tt><font FACE="Courier">Name</font></tt> </td>
    <td WIDTH="192">mnuFile</td>
  </tr>
  <tr>
    <td WIDTH="121"> </td>
    <td WIDTH="90"><tt><font FACE="Courier">Caption</font></tt> </td>
    <td WIDTH="192">&quot;File&quot;</td>
  </tr>
  <tr>
    <td WIDTH="121">Level 2</td>
    <td WIDTH="90"><tt><font FACE="Courier">Name</font></tt> </td>
    <td WIDTH="192">mnuFileItem</td>
  </tr>
  <tr>
    <td WIDTH="121"> </td>
    <td WIDTH="90"><tt><font FACE="Courier">Caption</font></tt> </td>
    <td WIDTH="192">&quot;Log &amp;In...&quot;</td>

⌨️ 快捷键说明

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