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

📄 ch5.htm

📁 MAPI__SAPI__TAPI
💻 HTM
📖 第 1 页 / 共 5 页
字号:
  <tr>
    <td WIDTH="128"><tt><font FACE="Courier">Name</font></tt></td>
    <td WIDTH="462">Job Request Form</td>
  </tr>
  <tr>
    <td WIDTH="128"><tt><font FACE="Courier">Description</font></tt> </td>
    <td WIDTH="462">Use this form to initiate a job request to the maintenance department. </td>
  </tr>
</table>
</center></div>

<p>After you supply the form name and description, press <tt><font FACE="Courier">Next</font></tt>. 
The wizard displays a final screen telling you that you have completed the wizard steps 
(see Figure 5.7). </p>

<p><a HREF="f5-7.gif"><b>Figure 5.7 : </b><i>The final screen of the Forms Designer 
Wizard.</i></a> </p>

<p>At this point you could press the <tt><font FACE="Courier">Back</font></tt> button to 
return to previous screens and make any changes needed. When you are sure that all screens 
have been completed properly, select <tt><font FACE="Courier">Finish</font></tt> to close 
the wizard. </p>

<p>Your form should look like the one in Figure 5.8. </p>

<p><a HREF="f5-8.gif"><b>Figure 5.8 : </b><i>The results of the Forms Designer Wizard.</i></a> 
</p>

<p>You now have a basic electronic form ready for final modification and use. You can see 
that the top part of the form has been filled in with the Date and From fields. These will 
be filled in automatically when you first execute the completed form. You'll also see the 
To, Cc, and Subject fields. These fields will be filled in by the person executing the 
form. </p>

<p>The rest of the form has been left blank. It will contain application-specific controls 
and information. In the next few sections, you'll add labels, input boxes, list controls, 
and a picture control to the form. </p>

<p>Before going further, save this project as <tt><font FACE="Courier">JOBREQ.EFP</font></tt>. 
</p>

<h3><a NAME="ModifyingtheJobRequestForm">Modifying the Job Request Form</a></h3>

<p>Now that you have the basic electronic form built, it's time to add the fields needed 
to collect and display specific data. To do this, you add controls for new fields and set 
the field properties. After adding all the needed fields, you set a few form-level 
properties, add some help, and you're ready to install and test your form. </p>

<h4>Adding a Field to the Job Request Form</h4>

<p>It's very easy to add fields to the form. All you do is click once on the toolbox 
object you want to use, then move your mouse to the desired location on the form, and 
click once again to drop the object onto the form. </p>
<div align="center"><center>

<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
  <tr>
    <td><b>Warning</b></td>
  </tr>
  <tr>
    <td><blockquote>
      <p>If you're used to Visual Basic, you'll discover that the method for dragging and 
      dropping form objects is slightly different here. You do not paint the objects onto the 
      EFD form as you do in Visual Basic. Here you just click, point, and click.</p>
    </blockquote>
    </td>
  </tr>
</table>
</center></div>

<p>As a test, select the <tt><font FACE="Courier">Entry Field</font></tt> object (called a 
text box in Visual Basic) and drop it onto the body of the form. </p>
<div align="center"><center>

<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
  <tr>
    <td><b>Note</b></td>
  </tr>
  <tr>
    <td><blockquote>
      <p>You'll notice that you cannot use the EFD to place standard form objects in the header 
      area of the form. You can, however, place one of the MAPI fields (From, Date, To, Cc, Bcc, 
      and Subject) on the header.</p>
    </blockquote>
    </td>
  </tr>
</table>
</center></div>

<p>Notice that the control is placed on the form along with an associated label control 
(see <br>
Figure 5.9). </p>

<p><a HREF="f5-9.gif"><b>Figure 5.9 : </b><i>Adding on Entry Field object to the form.</i></a> 
</p>

<p>You can click on the label in design mode to edit the contents. You can also use the 
anchors on the object to move or resize it as needed. It is also possible to 
&quot;unlink&quot; the caption and input control by selecting the large square on the 
upper left of the input control and moving it independently of the caption. </p>
<div align="center"><center>

<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
  <tr>
    <td><b>Tip</b></td>
  </tr>
  <tr>
    <td><blockquote>
      <p>Deleting the caption from the input form will also delete the input control itself. You 
      can use the <tt><font FACE="Courier">General</font></tt> tab of the Field Properties 
      dialog box (double-click the control) to remove the caption. Locate the <tt><font
      FACE="Courier">Position</font></tt> drop-down list and set its value to <tt><font
      FACE="Courier">None</font></tt>. </p>
    </blockquote>
    </td>
  </tr>
</table>
</center></div>

<p>Now that you've added a field to the form, you need to adjust several of the field's 
properties. In the next section, you'll learn how to do this using the Field Properties 
dialog box. </p>

<h4>Using the Field Properties Dialog Box</h4>

<p>The Field Properties dialog box gives you access to several properties of the field 
object (see Figure 5.10). </p>

<p><a HREF="f5-10.gif"><b>Figure 5.10 : </b><i>Viewing the Field Properties dialog box.</i></a> 
</p>

<p>This dialog has three tabs: 

<ul>
  <li><i>General</i>-Use this tab to set the name, caption, and position of the control on the 
    form. You can also use the tab to establish the control's locked, hidden, and required 
    status and to enter the field-level help. </li>
  <li><i>Format</i>-Use this tab to set the font, size, color, alignment, and other formatting 
    properties of the control. Note that you must use this same tab to set properties for both 
    input control and the caption. </li>
  <li><i>Initial Value</i>-Use this tab to enter the default value for this control. The 
    contents of this tab depend on the type of control. List and combo boxes allow you to 
    enter multiple items, text boxes allow you to enter straight text, picture boxes allow you 
    to load a graphic image from the disk, and so on. </li>
</ul>

<p>Use Table 5.2 as a guide in setting the field properties of the text box field on your 
job request form.<br>
</p>

<p align="center"><b>Table 5.2. Setting field properties of the text box control.</b> </p>
<div align="center"><center>

<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
  <tr>
    <td><i>Tab</i></td>
    <td WIDTH="195"><i>Property</i> </td>
    <td WIDTH="120"><i>Setting</i></td>
  </tr>
  <tr>
    <td WIDTH="147"><tt><font FACE="Courier">General</font></tt> </td>
    <td WIDTH="195"><tt><font FACE="Courier">Reference Name</font></tt> </td>
    <td WIDTH="120">ContactPhone</td>
  </tr>
  <tr>
    <td WIDTH="147"> </td>
    <td WIDTH="195"><tt><font FACE="Courier">Column Name</font></tt> </td>
    <td WIDTH="120">Contact Phone</td>
  </tr>
  <tr>
    <td WIDTH="147"> </td>
    <td WIDTH="195"><tt><font FACE="Courier">Field Caption</font></tt> </td>
    <td WIDTH="120">Contact Phone:</td>
  </tr>
  <tr>
    <td WIDTH="147"> </td>
    <td WIDTH="195"><tt><font FACE="Courier">Required</font></tt> </td>
    <td WIDTH="120">(Checked)</td>
  </tr>
  <tr>
    <td WIDTH="147"><tt><font FACE="Courier">Format</font></tt> </td>
    <td WIDTH="195"><tt><font FACE="Courier">Maximum Characters</font></tt> </td>
    <td WIDTH="120">(Checked) 80</td>
  </tr>
  <tr>
    <td WIDTH="147"><tt><font FACE="Courier">Initial Value</font></tt> </td>
    <td WIDTH="195"><tt><font FACE="Courier">Initial Text</font></tt> </td>
    <td WIDTH="120">XXX-XXXX</td>
  </tr>
</table>
</center></div>

<p>After setting the properties on the three tabs, select <tt><font FACE="Courier">Close</font></tt> 
to save the information. </p>

<h3><a NAME="CompletingtheJobRequestFormFields">Completing the Job Request Form Fields</a></h3>

<p>You need to add several fields to the job request form before it is complete. Now that 
you have an idea of how to add fields and set their properties, use the information in 
Table 5.3 and Figure 5.11 to add, size, and locate the remaining fields on the form. </p>

<p><a HREF="f5-11.gif"><b>Figure 5.11 : </b><i>Laying out the Job request form.</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 area of the EFD form where you place your controls is scrollable. It is very easy 
      to lose one or more fields due to unexpected scrolling when you place a control on the 
      form. To make it easy to see where things are on the form, you need to turn on the scroll 
      bars. Select <tt><font FACE="Courier">View | Show Scroll Bars</font></tt> from the main 
      menu. If you do not want users to see these at runtime, turn them off before you install 
      the form. </p>
    </blockquote>
    </td>
  </tr>
</table>
</center></div><div align="center"><center>

<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
  <tr>
    <td><b>Note</b></td>
  </tr>
  <tr>
    <td><blockquote>
      <p>Be sure to use a complete path/directory name for the Picture Field control in Table 
      5.3. You can find the <tt><font FACE="Courier">Chap05</font></tt> directory under the main 
      directory created when you installed the source code from the CD-ROM that ships with the 
      book. </p>
    </blockquote>
    </td>
  </tr>
</table>
</center></div>

<p>After adding all the fields and setting their properties, save the project (<tt><font
FACE="Courier">JOBREQ.EFP</font></tt>) before continuing with the next step. </p>

<h3><a NAME="SettingFormandWindowPropertiesofth">Setting Form and Window Properties of the 
Job Request Form</a></h3>

<p>There are several form- and window-level properties that you can set for Microsoft 
Exchange forms. These settings affect the way your form looks and behaves once it's up and 
running under Microsoft Exchange. </p>

<p>First, select <tt><font FACE="Courier">View | Window Properties</font></tt> from the 
main menu. Then set the properties using the information in Table 5.4.<br>
</p>

<p align="center"><b>Table 5.3. Control properties for the job request form.</b> </p>
<div align="center"><center>

<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
  <tr>
    <td><i>Control</i></td>
    <td WIDTH="113"><i>Property Tab</i> </td>
    <td WIDTH="163"><i>Property</i></td>
    <td WIDTH="181"><i>Setting</i> </td>
  </tr>
  <tr>
    <td WIDTH="133">Entry Field</td>
    <td WIDTH="113"><tt><font FACE="Courier">General</font></tt> </td>
    <td WIDTH="163"><tt><font FACE="Courier">Reference Name</font></tt> </td>
    <td WIDTH="181">ContactPhone</td>
  </tr>
  <tr>
    <td WIDTH="133"> </td>
    <td WIDTH="113"> </td>
    <td WIDTH="163"><tt><font FACE="Courier">Column Name</font></tt> </td>
    <td WIDTH="181">Contact Phone</td>
  </tr>
  <tr>
    <td WIDTH="133"> </td>
    <td WIDTH="113"> </td>
    <td WIDTH="163"><tt><font FACE="Courier">Field Caption</font></tt> </td>
    <td WIDTH="181">Contact Phone:</td>
  </tr>
  <tr>
    <td WIDTH="133"> </td>
    <td WIDTH="113"> </td>
    <td WIDTH="163"><tt><font FACE="Courier">Required</font></tt> </td>
    <td WIDTH="181">(Checked)</td>
  </tr>
  <tr>
    <td WIDTH="133"> </td>
    <td WIDTH="113"> </td>
    <td WIDTH="163"><tt><font FACE="Courier">Left</font></tt> </td>
    <td WIDTH="181">1290</td>
  </tr>
  <tr>
    <td WIDTH="133"> </td>
    <td WIDTH="113"> </td>
    <td WIDTH="163"><tt><font FACE="Courier">Top</font></tt> </td>
    <td WIDTH="181">90</td>
  </tr>
  <tr>
    <td WIDTH="133"> </td>
    <td WIDTH="113"> </td>
    <td WIDTH="163"><tt><font FACE="Courier">Width</font></tt> </td>
    <td WIDTH="181">2400</td>
  </tr>
  <tr>
    <td WIDTH="133"> </td>
    <td WIDTH="113"> </td>
    <td WIDTH="163"><tt><font FACE="Courier">Height</font></tt> </td>
    <td WIDTH="181">300</td>
  </tr>
  <tr>
    <td WIDTH="133"> </td>
    <td WIDTH="113"><tt><font FACE="Courier">Format</font></tt> </td>
    <td WIDTH="163"><tt><font FACE="Courier">Maximum Characters</font></tt> </td>
    <td WIDTH="181">(Checked) 80</td>
  </tr>
  <tr>
    <td WIDTH="133"> </td>

⌨️ 快捷键说明

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