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

📄 2.htm

📁 vb基础教程源文件 处学者必备
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=GB2312">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 9">
<meta name=Originator content="Microsoft Word 9">
<link rel=File-List href="./2.files/filelist.xml">
<link rel=Edit-Time-Data href="./2.files/editdata.mso">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>无标题文档</title>
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Author>oem</o:Author>
  <o:Template>Normal</o:Template>
  <o:LastAuthor>oem</o:LastAuthor>
  <o:Revision>2</o:Revision>
  <o:TotalTime>1</o:TotalTime>
  <o:Created>2006-06-30T09:17:00Z</o:Created>
  <o:LastSaved>2006-06-30T09:18:00Z</o:LastSaved>
  <o:Pages>23</o:Pages>
  <o:Words>3710</o:Words>
  <o:Characters>21152</o:Characters>
  <o:Lines>176</o:Lines>
  <o:Paragraphs>42</o:Paragraphs>
  <o:CharactersWithSpaces>25976</o:CharactersWithSpaces>
  <o:Version>9.2812</o:Version>
 </o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing>
  <w:Compatibility>
   <w:UseFELayout/>
  </w:Compatibility>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
@font-face
	{font-family:宋体;
	panose-1:2 1 6 0 3 1 1 1 1 1;
	mso-font-alt:SimSun;
	mso-font-charset:134;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
	{font-family:"\@宋体";
	panose-1:2 1 6 0 3 1 1 1 1 1;
	mso-font-charset:134;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:3 135135232 16 0 262145 0;}
 /* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:宋体;
	mso-bidi-font-family:"Times New Roman";}
p.MsoFooter, li.MsoFooter, div.MsoFooter
	{margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	tab-stops:center 207.65pt right 415.3pt;
	layout-grid-mode:char;
	font-size:9.0pt;
	font-family:宋体;
	mso-bidi-font-family:"Times New Roman";}
p
	{font-size:12.0pt;
	font-family:宋体;
	mso-bidi-font-family:"Times New Roman";}
 /* Page Definitions */
@page
	{mso-page-border-surround-header:no;
	mso-page-border-surround-footer:no;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;
	mso-header-margin:42.55pt;
	mso-footer-margin:49.6pt;
	mso-page-numbers:12;
	mso-even-footer:url("./2.files/header.htm") ef1;
	mso-footer:url("./2.files/header.htm") f1;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
-->
</style>
</head>

<body lang=ZH-CN link=blue vlink=blue style='tab-interval:21.0pt'>

<div class=Section1>

<h2>第二章<span lang=EN-US> VB的界面设计 </span></h2>

<p align=center style='text-align:center'><strong><span lang=EN-US>2.1 VB 用户界面设计基础
</span></strong></p>

<p><strong><span lang=EN-US>1. 概述 </span></strong></p>

<p>界面的设计有两步:先绘制控件,然后确定控件属性。<span lang=EN-US> <br>
<br>
绘制控件:在工具箱里单击想画的控件,在窗体里按下鼠标并拖曳,然后松开鼠标即可。确定属性:先选中控件,然后按 <strong>F4 </strong>键或单击工具栏上的
<strong>属性窗口 </strong>进入属性( Properties )窗口,再在属性窗口中找到要设置的属性并进行设置。 </span></p>

<p><strong><span lang=EN-US>2. 常用属性的设置 </span></strong></p>

<p><strong>(<span lang=EN-US> 1 ) Name 属性 </span></strong></p>

<p>对象都有名字,计算机把名字看成对象于对象之间的根本差异,因此在同一窗体里不许出现重名的情况(除非这是一个控件数组),且名字不得超过<span
lang=EN-US> 40 个字。 </span></p>

<p>在简单的程序里,给控件命名不是很必要,完全可以使用控件<span lang=EN-US> Name 属性的缺省值。例如 Text1 。但在有几十个控件的复杂窗体里,就很难区分它们。所以,
VB 推荐由三个小写字母的前缀和一个第一个字母为大写的描述性单词组成的名字。例如 cmdMyButton 是一个命令按钮(前缀是 cmd ) </span></p>

<p align=center style='text-align:center'><strong>推荐的前缀 </strong></p>

<table border=0 cellspacing=0 cellpadding=0 style='mso-cellspacing:0cm;
 mso-padding-alt:0cm 0cm 0cm 0cm'>
 <tr>
  <td width=247 style='width:185.25pt;padding:0cm 0cm 0cm 0cm'>
  <p align=center style='text-align:center'><strong>对象 </strong></p>
  </td>
  <td width=77 style='width:57.75pt;padding:0cm 0cm 0cm 0cm'>
  <p align=center style='text-align:center'><strong>前缀 </strong></p>
  </td>
  <td width=168 style='width:126.0pt;padding:0cm 0cm 0cm 0cm'>
  <p align=center style='text-align:center'><strong>例子 </strong></p>
  </td>
 </tr>
 <tr>
  <td width=247 style='width:185.25pt;padding:0cm 0cm 0cm 0cm'>
  <p>确认框(<span lang=EN-US> Check Box ) </span></p>
  </td>
  <td width=77 style='width:57.75pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>chk </span></p>
  </td>
  <td width=168 style='width:126.0pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>chkCareerChioce </span></p>
  </td>
 </tr>
 <tr>
  <td width=247 style='width:185.25pt;padding:0cm 0cm 0cm 0cm'>
  <p>组合框(<span lang=EN-US> Combo Box ) </span></p>
  </td>
  <td width=77 style='width:57.75pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>cbo </span></p>
  </td>
  <td width=168 style='width:126.0pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>cboCrimesCommitted </span></p>
  </td>
 </tr>
 <tr>
  <td width=247 style='width:185.25pt;padding:0cm 0cm 0cm 0cm'>
  <p>命令钮(<span lang=EN-US> Command Button ) </span></p>
  </td>
  <td width=77 style='width:57.75pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>cmd </span></p>
  </td>
  <td width=168 style='width:126.0pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>cmdExit </span></p>
  </td>
 </tr>
 <tr>
  <td width=247 style='width:185.25pt;padding:0cm 0cm 0cm 0cm'>
  <p>数据库控件(<span lang=EN-US> Data Control ) </span></p>
  </td>
  <td width=77 style='width:57.75pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>dat </span></p>
  </td>
  <td width=168 style='width:126.0pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>datTopSecretInfo </span></p>
  </td>
 </tr>
 <tr>
  <td width=247 style='width:185.25pt;padding:0cm 0cm 0cm 0cm'>
  <p>目录列表框(<span lang=EN-US> Directory List Box ) </span></p>
  </td>
  <td width=77 style='width:57.75pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>dir </span></p>
  </td>
  <td width=168 style='width:126.0pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>dirTree </span></p>
  </td>
 </tr>
 <tr>
  <td width=247 style='width:185.25pt;padding:0cm 0cm 0cm 0cm'>
  <p>驱动器列表框(<span lang=EN-US> Drive List Box ) </span></p>
  </td>
  <td width=77 style='width:57.75pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>drv </span></p>
  </td>
  <td width=168 style='width:126.0pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>drvHardDisk </span></p>
  </td>
 </tr>
 <tr>
  <td width=247 style='width:185.25pt;padding:0cm 0cm 0cm 0cm'>
  <p>文件列表框(<span lang=EN-US> File List Box ) </span></p>
  </td>
  <td width=77 style='width:57.75pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>fil </span></p>
  </td>
  <td width=168 style='width:126.0pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>filDocuments </span></p>
  </td>
 </tr>
 <tr>
  <td width=247 style='width:185.25pt;padding:0cm 0cm 0cm 0cm'>
  <p>窗体(<span lang=EN-US> Form ) </span></p>
  </td>
  <td width=77 style='width:57.75pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>frm </span></p>
  </td>
  <td width=168 style='width:126.0pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>frm1040Tax </span></p>
  </td>
 </tr>
 <tr>
  <td width=247 style='width:185.25pt;padding:0cm 0cm 0cm 0cm'>
  <p>框架(<span lang=EN-US> Frame ) </span></p>
  </td>
  <td width=77 style='width:57.75pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>fra </span></p>
  </td>
  <td width=168 style='width:126.0pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>fraGroupButtons </span></p>
  </td>
 </tr>
 <tr>
  <td width=247 style='width:185.25pt;padding:0cm 0cm 0cm 0cm'>
  <p>水平滚动条(<span lang=EN-US> Horizontal Scroll Bar ) </span></p>
  </td>
  <td width=77 style='width:57.75pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>hsb </span></p>
  </td>
  <td width=168 style='width:126.0pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>hsbTemperature </span></p>
  </td>
 </tr>
 <tr>
  <td width=247 style='width:185.25pt;padding:0cm 0cm 0cm 0cm'>
  <p>图形(<span lang=EN-US> Image ) </span></p>
  </td>
  <td width=77 style='width:57.75pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>img </span></p>
  </td>
  <td width=168 style='width:126.0pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>imgPrettyDrawing </span></p>
  </td>
 </tr>
 <tr>
  <td width=247 style='width:185.25pt;padding:0cm 0cm 0cm 0cm'>
  <p>标签(<span lang=EN-US> Label ) </span></p>
  </td>
  <td width=77 style='width:57.75pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>lbl </span></p>
  </td>
  <td width=168 style='width:126.0pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>lblFakeName </span></p>
  </td>
 </tr>
 <tr>
  <td width=247 style='width:185.25pt;padding:0cm 0cm 0cm 0cm'>
  <p>线(<span lang=EN-US> Line ) </span></p>
  </td>
  <td width=77 style='width:57.75pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>lin </span></p>
  </td>
  <td width=168 style='width:126.0pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>linBorder </span></p>
  </td>
 </tr>
 <tr>
  <td width=247 style='width:185.25pt;padding:0cm 0cm 0cm 0cm'>
  <p>列表框(<span lang=EN-US> List Box ) </span></p>
  </td>
  <td width=77 style='width:57.75pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>lst </span></p>
  </td>
  <td width=168 style='width:126.0pt;padding:0cm 0cm 0cm 0cm'>
  <p><span lang=EN-US>lstCandidates </span></p>
  </td>
 </tr>
 <tr>
  <td width=247 style='width:185.25pt;padding:0cm 0cm 0cm 0cm'>
  <p>菜单(<span lang=EN-US> Menu ) </span></p>

⌨️ 快捷键说明

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