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

📄 第3章 界面设计.htm

📁 这是有关截面设计的游泳的资料,相信vc爱好者学习之后会受益匪浅,内容是第3章 界面设计
💻 HTM
📖 第 1 页 / 共 5 页
字号:
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">3.2简单界面控件<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">ListBox、</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">ComboBox、ListBox、CheckedListBox、ListBox与CheckedListBox、PictureBox、Timer<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 18pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt; mso-pagination: widow-orphan" 
align=left><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">(<SPAN 
lang=EN-US>2 学时)<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 18pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt; mso-layout-grid-align: none" 
align=left><SPAN 
style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt; mso-font-kerning: 0pt; mso-ansi-language: ZH-CN">【教学目的】</SPAN><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN-LEFT: 39pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 20pt; tab-stops: list 39.0pt; mso-line-height-rule: exactly; mso-list: l0 level1 lfo2"><![if !supportLists]><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Wingdings; mso-bidi-font-size: 12.0pt">&Oslash;<SPAN 
style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN></SPAN><![endif]><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">典型列表类界面的应用特征与方法。<SPAN 
lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal 
style="MARGIN-LEFT: 39pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 20pt; tab-stops: list 39.0pt; mso-line-height-rule: exactly; mso-list: l0 level1 lfo2"><![if !supportLists]><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Wingdings; mso-bidi-font-size: 12.0pt">&Oslash;<SPAN 
style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN></SPAN><![endif]><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">列表类控件与定时控件的程序设计方法。<SPAN 
lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal 
style="MARGIN-LEFT: 39pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 20pt; tab-stops: list 39.0pt; mso-line-height-rule: exactly; mso-list: l0 level1 lfo2"><![if !supportLists]><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Wingdings; mso-bidi-font-size: 12.0pt">&Oslash;<SPAN 
style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN></SPAN><![endif]><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">图片的应用方法。<SPAN 
lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 18pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt; mso-layout-grid-align: none" 
align=left><SPAN 
style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt; mso-font-kerning: 0pt; mso-ansi-language: ZH-CN">【教学重点】</SPAN><SPAN 
style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt; mso-font-kerning: 0pt"> 
<SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal 
style="MARGIN-LEFT: 18pt; TEXT-ALIGN: left; mso-layout-grid-align: none" 
align=left><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">界面控件的一般特性,典型控件的属性、事件与方法的应用意义与特征,应用方法。</SPAN><SPAN 
style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt; mso-font-kerning: 0pt; mso-ansi-language: ZH-CN"><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 18pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt; mso-layout-grid-align: none" 
align=left><SPAN 
style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt; mso-font-kerning: 0pt; mso-ansi-language: ZH-CN">【教学难点】<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN-LEFT: 39pt; TEXT-INDENT: -21pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: list 39.0pt; mso-list: l1 level1 lfo4" 
align=left><![if !supportLists]><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Wingdings; mso-bidi-font-size: 12.0pt">&Oslash;<SPAN 
style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN></SPAN><![endif]><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">控件属性的应用方法、典型属性枚举理解与应用。<SPAN 
lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal 
style="MARGIN-LEFT: 39pt; TEXT-INDENT: -21pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: list 39.0pt; mso-list: l1 level1 lfo4" 
align=left><![if !supportLists]><SPAN lang=EN-US 
style="FONT-FAMILY: Wingdings">&Oslash;<SPAN 
style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN></SPAN><![endif]><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">事件与方法的应用意义与方法。</SPAN><SPAN 
lang=EN-US 
style="FONT-FAMILY: 宋体; mso-hansi-font-family: 'Times New Roman'"><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN 
lang=EN-US style="FONT-FAMILY: 方正舒体; mso-hansi-font-family: 宋体"><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 18.05pt; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt"><B><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">3.2简单界面控件<o:p></o:p></SPAN></B></P>
<P class=MsoNormal 
style="TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10pt"><!--[if gte vml 1]><v:shapetype 
id=_x0000_t75 coordsize = "21600,21600" o:preferrelative = "t" o:spt = "75" 
filled = "f" stroked = "f" path = " m@4@5 l@4@11@9@11@9@5 xe"><v:stroke 
joinstyle = "miter"></v:stroke><v:formulas><v:f eqn = 
"if lineDrawn pixelLineWidth 0 "></v:f><v:f eqn = "sum @0 1 0 "></v:f><v:f eqn = 
"sum 0 0 @1 "></v:f><v:f eqn = "prod @2 1 2 "></v:f><v:f eqn = 
"prod @3 21600 pixelWidth "></v:f><v:f eqn = 
"prod @3 21600 pixelHeight "></v:f><v:f eqn = "sum @0 0 1 "></v:f><v:f eqn = 
"prod @6 1 2 "></v:f><v:f eqn = "prod @7 21600 pixelWidth "></v:f><v:f eqn = 
"sum @8 21600 0 "></v:f><v:f eqn = "prod @7 21600 pixelHeight "></v:f><v:f eqn = 
"sum @10 21600 0 "></v:f></v:formulas><v:path o:extrusionok = "f" 
gradientshapeok = "t" o:connecttype = "rect"></v:path><o:lock aspectratio="t" 
v:ext="edit"></o:lock></v:shapetype><v:shape id=_x0000_s1038 
style="MARGIN-TOP: 10.2pt; Z-INDEX: -3; LEFT: 0px; MARGIN-LEFT: 449.5pt; WIDTH: 138.75pt; POSITION: absolute; HEIGHT: 114.75pt; TEXT-ALIGN: left; mso-wrap-edited: f; mso-position-horizontal: right" 
wrapcoords="-117 0 -117 21459 21600 21459 21600 0 -117 0" type = "#_x0000_t75" 
coordsize = "21600,21600" o:regroupid = "1"><v:imagedata 
o:title="3-15 ComboBox 控件" src = 
"./3-2VB.NET教案.files/image001.png"></v:imagedata><w:wrap anchorx="page" type = 
"square"></w:wrap></v:shape><![endif]--><![if !vml]><img width=185 height=153
src="./3-2VB.NET教案.files/image002.jpg" align=right hspace=12 v:shapes="_x0000_s1038"><![endif]><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">五、<SPAN 
lang=EN-US>ComboBox控件(下拉列表框)<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 18pt; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt"><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">下拉组合框<SPAN 
lang=EN-US>ComboBox控件用于在一个下拉列表中显示或选择数据。外观特征如图。<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 18pt; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt"><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">顶部:是一个允许用户键入列表项的文本框。<SPAN 
lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 18pt; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt"><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">列表框部分:它显示可供用户选择项的列表。<SPAN 
lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 18pt; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt"><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">⒈<SPAN 
lang=EN-US>ComboBox控件的常用属性<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 18pt; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt"><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">⑴<SPAN 
lang=EN-US>DropDownStyle 属性(通过演示进行操作)<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 18pt; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt"><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">①<SPAN 
lang=EN-US>Simple:允许简单的下拉列表框;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 18pt; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt"><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">②<SPAN 
lang=EN-US>DropDownList:下拉列表框,文本部分不可编辑,并且必须鼠标单击“箭头”才能查看下拉列表。<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 18pt; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt"><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">③<SPAN 
lang=EN-US>DropDown:下拉列表框,文本部分可编辑,并且用户必须鼠标单击“箭头”才能查看下拉列表。<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 18pt; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt"><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">⑵<SPAN 
lang=EN-US>Items 属性<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 18pt; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt"><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">表示<SPAN 
lang=EN-US>ComboBox 
中所包含项的集合。可获得ComboBox列表的所有项目或访问集合中的某一指定项。也可以向列表中添加新项、移除项和获得集合中项的数目。Items项的引用是通过项索引号进行的,</SPAN></SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt">索引号从<SPAN 
lang=EN-US>0开始。</SPAN></SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 18pt; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt"><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">例如:</SPAN><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt">ComboBox1.Items.Item(1)表示ComboBox1中的第二个元素。</SPAN><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 18pt; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt"><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">⑶</SPAN><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt">SelectedItem</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">属性<SPAN 
lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 18pt; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt"><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">获取</SPAN><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt">ComboBox控件</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">当前选定的项值,例如:</SPAN><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt">ComboBox1.SelectedItem。</SPAN><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 18pt; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt"><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">⑷</SPAN><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt">SelectedIndex</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">属性<SPAN 
lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal 
style="TEXT-INDENT: 18pt; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt"><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">获取或设置</SPAN><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt">ComboBox控件</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt">当前选定的项的索引号,例如,</SPAN><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体">获取当前选定项的索引号程序代码:</SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt"><o:p></o:p></SPAN></P>
<P class=MsoBodyText 
style="TEXT-INDENT: 18pt; mso-char-indent-count: 2.0; mso-char-indent-size: 9pt"><SPAN 
lang=EN-US style="FONT-SIZE: 9pt; mso-hansi-font-family: 宋体">Dim Index_N As 
integer = ComboBox1.SelectedIndex </SPAN><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; mso-bidi-font-size: 10.0pt; mso-hansi-font-family: 宋体"><o:p></o:p></SPAN></P>

⌨️ 快捷键说明

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