📄 c++ builder 初学问与答(一).htm
字号:
· <a href=/article/5/11/2006/200608301360.html title='Google排名—搜索引擎登记技巧'>Google排名—搜索引..</a><br>
· <font color='#0066FF'>[图文]</font> <a href=/article/10/2006/200608291188.html title='菜鸟安全防患之饿死木马'>菜鸟安全防患..</a><br>
· <a href=/article/9/2006/20060827361.html title='数学最大数字'>数学最大数字</a><br>
· <a href=/article/10/2006/200608291195.html title='Google搜索技巧(6):用Google找自己'>Google搜索技巧(6):..</a><br></td>
</tr>
<tr>
<td height="2" bgcolor="#FFFFFF"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="titleback1">相关文章</td>
</tr>
<tr>
<td height="100" valign="top">· <a href="/article/1/14/2006/2006092518481.html" title='《c++ primer》读书笔记4'>《c++ primer》读书..</a><br>
· <a href="/article/1/14/2006/2006092518480.html" title='《c++ primer》读书笔记6'>《c++ primer》读书..</a><br>
· <a href="/article/1/14/2006/2006092518477.html" title='一个有意思的C++ trick (2)'>一个有意思的C++ tr..</a><br>
· <a href="/article/1/14/2006/2006092518473.html" title='《c++ primer》读书笔记3'>《c++ primer》读书..</a><br>
· <a href="/article/1/14/2006/2006092518472.html" title='《c++ primer》读书笔记5'>《c++ primer》读书..</a><br>
· <a href="/article/1/14/2006/2006092518470.html" title='如何在C++ Builder的DLL中使用数据库控件'>如何在C++ Builder的..</a><br>
· <a href="/article/1/14/2006/2006092518469.html" title='Python 与 C++ 程序的简单实例对比'>Python 与 C++ 程序..</a><br>
· <a href="/article/1/14/2006/2006092518468.html" title='Visual C++ MFC 一文说尽 (推荐)(很长,没耐心就不要看了)'>Visual C++ MFC 一文..</a><br>
· <a href="/article/1/14/2006/2006092518466.html" title='VC++ Members Weblog'>VC++ Members Weblo..</a><br>
· <a href="/article/1/14/2006/2006092518459.html" title='C++ Builder和托管C++中属性的使用建议'>C++ Builder和托管C..</a><br></td>
</tr>
</table>
</td>
<td width="588" align="right" class="tableright">
<table width="575" border="0" cellpadding="0" cellspacing="0" style="table-layout:fixed;word-break:break-all">
<tr>
<td align="center" height=32 style="font-size: 12pt;color: #FF6600;">C++ Builder 初学问与答(一)</td>
</tr>
<tr>
<td align="center" height=25 bgcolor=#F7F7F7>作者:佚名 来源:不详 发布时间:25/09/2006 19:23:52 发布人:admin</td>
</tr>
<script language=javascript>
var newasp_fontsize=9;
var newasp_lineheight=12;
</script>
<tr>
<td><p align="right"><a style="CURSOR: hand; POSITION: relative" onclick="if(newasp_fontsize>8){NewaspContentLabel.style.fontSize=(--newasp_fontsize)+"pt";NewaspContentLabel.style.lineHeight=(--newasp_lineheight)+"pt";}" title="减小字体"><img src="/images/1.gif" border="0" width="15" height="15"><font color="#FF6600">减小字体</font></a>
<a style="CURSOR: hand; POSITION: relative" onclick="if(newasp_fontsize<64){NewaspContentLabel.style.fontSize=(++newasp_fontsize)+"pt";NewaspContentLabel.style.lineHeight=(++newasp_lineheight)+"pt";}" title="增大字体"><img src="/images/2.gif" border="0" width="15" height="15"><font color="#FF6600">增大字体</font></a>
</p>
<div id="NewaspContentLabel" style="display:block;padding:0px 10px;" class="ContentFont"><FONT id=font_word style="FONT-SIZE: 14px; FONT-FAMILY: 宋体, Verdana, Arial, Helvetica, sans-serif"><H2 style="MARGIN: auto 0cm; TEXT-INDENT: 28.05pt; mso-char-indent-count: 2.0; mso-char-indent-size: 14.0pt" align=center><SPAN lang=EN-US><FONT face=Arial>C++ Builder</FONT></SPAN><SPAN style="FONT-FAMILY: 黑体; mso-ascii-font-family: Arial">初学问与答</SPAN></H2><P class=MsoNormalIndent style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" align=center><STRONG><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''; mso-bidi-font-family: Arial">(版权要求:本文除了经过</SPAN></STRONG><STRONG><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-bidi-font-family: Arial">CSDN</SPAN></STRONG><STRONG><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''; mso-bidi-font-family: Arial">授权或作者同意,不得转载)</SPAN></STRONG></P><P class=MsoNormalIndent style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" align=center><STRONG><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''; mso-bidi-font-family: Arial"></SPAN></STRONG> </P><P class=MsoNormalIndent style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><FONT size=3><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''"> 一直以来都想写一点为</SPAN><SPAN lang=EN-US>BCB</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">初学者快速入门的东西,前不久写了几篇《闲谈</SPAN><SPAN lang=EN-US>BCB</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">》想把自己学习</SPAN><SPAN lang=EN-US>BCB</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">中如何来解决难点的方法说给大家,没想到被骂得不成样子。本想不写了,但觉得这些东西留下来能做什么呢?还是用另一种方法来重新演译我的思维吧,最近有些忙,那几篇没有写完的文章,我也会尽快写完的,至于《深入</SPAN><SPAN lang=EN-US>QR</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">》,我想我一定会用另一种手法来写,让你一看就会把</SPAN><SPAN lang=EN-US>QR</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">这个娇女的所有衣服都脱光,不整理到这个地步,我是不敢轻易再拿出来,还请朋友见谅!</SPAN></FONT></P><P class=MsoNormalIndent style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><FONT size=3><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">本文分为《基础入门》、《快速提高》与《成功编程者》三部分。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; mso-bidi-font-size: 10.0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></FONT></P><P class=MsoNormalIndent style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; TEXT-ALIGN: center; mso-char-indent-count: 2.0; mso-char-indent-size: 12.0pt" align=center><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; mso-bidi-font-size: 10.0pt"> <o:p></o:p></SPAN></B></P><P class=MsoNormalIndent style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; TEXT-ALIGN: center; mso-char-indent-count: 2.0; mso-char-indent-size: 12.0pt" align=center><B><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''; mso-bidi-font-size: 10.0pt">第一部分:基础入门</SPAN></B><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; mso-bidi-font-size: 10.0pt"><o:p></o:p></SPAN></B></P><H3 style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24pt; mso-char-indent-count: 2.0; mso-char-indent-size: 12.0pt"><A name=_Toc494087970></A><A name=_Toc494088142><SPAN style="mso-bookmark: _Toc494087970"><SPAN lang=EN-US style="COLOR: windowtext"><FONT face=Arial size=3>1.</FONT></SPAN></SPAN></A><FONT size=3><SPAN style="mso-bookmark: _Toc494088142"><SPAN style="mso-bookmark: _Toc494087970"><SPAN style="COLOR: windowtext; FONT-FAMILY: 黑体; mso-ascii-font-family: Arial">窗体</SPAN></SPAN></SPAN><SPAN style="mso-bookmark: _Toc494087970"></SPAN><SPAN style="mso-bookmark: _Toc494088142"></SPAN><SPAN lang=EN-US style="COLOR: windowtext"><o:p></o:p></SPAN></FONT></H3><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><FONT size=3><B><SPAN lang=EN-US>1)</SPAN></B><B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">问:</SPAN></B><SPAN lang=EN-US><a target="_blank" href="http://www.malegebide.com" class="wordstyle">Windows</a></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">的编程就是在窗体的基础上实现的,<span id="vrccewdjfmg">管U{na`me中3_</span><div id="shmjtwkqffcclp">网垠的.8!m管S}p专p%</div></SPAN><SPAN lang=EN-US> C++Builder</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">是怎样处理窗体的呢?</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><FONT size=3><B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">答:</SPAN></B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">窗体的一部分功能通过窗体的属性来实现,窗体的属性非常多,这里只对其中比较重要的属性进行介绍。</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt; tab-stops: 86.4pt 185.4pt 426.1pt" align=left><FONT size=3><SPAN lang=EN-US>1</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">.</SPAN><SPAN lang=EN-US>ActiveControl</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">指定窗体上的某个组件为输入焦点。如下面的语句将窗体上的</SPAN><SPAN lang=EN-US>Label1</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">组件成为输入焦点:</SPAN><SPAN lang=EN-US>ActiveControl=Label1</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">。在同一时时刻,应用程序只能有一个输入焦点。</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt; tab-stops: 86.4pt 185.4pt 426.1pt" align=left><FONT size=3><SPAN lang=EN-US>2</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">.</SPAN><SPAN lang=EN-US>BorderIcons</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">用来设定标题栏上出现哪些系统图标。它是一个集合,可以设成以下几个类型:最大化按钮</SPAN><SPAN lang=EN-US>(biMaximize)</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">、最小化按钮</SPAN><SPAN lang=EN-US>(biMinimize)</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">、帮助按钮</SPAN><SPAN lang=EN-US>(biHelp)</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">和系统菜单</SPAN><SPAN lang=EN-US>(biSystemMenu)</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">。</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 11.75pt; TEXT-ALIGN: left; tab-stops: 86.4pt 185.4pt 426.1pt" align=left><FONT size=3><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>3</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">.</SPAN><SPAN lang=EN-US>Icon</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">属性用来指定当窗体最小化时显示的图标。</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; tab-stops: 86.4pt 185.4pt 426.1pt" align=left><FONT size=3><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>4</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">.</SPAN><SPAN lang=EN-US>KeyPreview</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">属性为</SPAN><SPAN lang=EN-US>true</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">时,表示击键事件发生时先传给窗体,然后再传给有输入焦点的组件上,相当于窗体截获了原本属于组件的事件。缺省值为</SPAN><SPAN lang=EN-US>false</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">,表示击键事件只送到当前有输入焦点的组件上。</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt; tab-stops: 86.4pt 185.4pt 426.1pt" align=left><FONT size=3><SPAN lang=EN-US>5</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">.</SPAN> <SPAN lang=EN-US>Menu</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">属性用来指定窗体的主菜单。</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt; tab-stops: 86.4pt 185.4pt 426.1pt" align=left><FONT size=3><SPAN lang=EN-US>6</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">.</SPAN><SPAN lang=EN-US>Visible</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">属性用来确定窗体是否可见。</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt; tab-stops: 86.4pt 185.4pt 426.1pt" align=left><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''"><FONT size=3>此外还有一些运行时态属性,这些属性只有在程序运行的时候才能通过编程访问。这种属性主要有:</FONT></SPAN></P><TABLE style="MARGIN-LEFT: 5.4pt; BORDER-COLLAPSE: collapse; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt" cellSpacing=0 cellPadding=0 border=0><TR><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 102.15pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=136><P class=MsoToc1 style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt; tab-stops: 86.4pt 185.4pt 426.1pt"><SPAN lang=EN-US>Active</SPAN></P></TD><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 261.05pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=348><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; tab-stops: 86.4pt 185.4pt 426.1pt" align=left><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">属性用来确定窗体是否获得输入焦点。</SPAN></P></TD></TR><TR><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 102.15pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=136><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt; tab-stops: 86.4pt 185.4pt 426.1pt"><SPAN lang=EN-US>ActiveMDIChild</SPAN></P></TD><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 261.05pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=348><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; tab-stops: 86.4pt 185.4pt 426.1pt" align=left><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">这个函数将返回当前活动的子窗体。</SPAN></P></TD></TR><TR><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 102.15pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=136><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt; tab-stops: 86.4pt 185.4pt 426.1pt"><SPAN lang=EN-US>DropTarget</SPAN></P></TD><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 261.05pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=348><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; tab-stops: 86.4pt 185.4pt 426.1pt" align=left><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">属性用来指定窗体是否是拖放操作的对象。</SPAN></P></TD></TR><TR><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 102.15pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=136><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt; tab-stops: 86.4pt 185.4pt 426.1pt"><SPAN lang=EN-US>Parent</SPAN></P></TD><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 261.05pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=348><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; tab-stops: 86.4pt 185.4pt 426.1pt" align=left><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">属性用来设定包含窗体的窗口控件,通常是另一个窗体。如果窗体没有包含它的控件,那么它的</SPAN><SPAN lang=EN-US>Parent</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">属性为</SPAN><SPAN lang=EN-US>nil</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">。</SPAN></P></TD></TR></TABLE><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt; tab-stops: 86.4pt 185.4pt 426.1pt" align=left><SPAN lang=EN-US><FONT size=3> <o:p></o:p></FONT></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><FONT size=3><B><SPAN lang=EN-US>2</SPAN></B><B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">)问:</SPAN></B><SPAN lang=EN-US> <a target="_blank" href="http://www.malegebide.com" class="wordstyle">Windows</a></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">窗体有很多样式,比如对话框,弹出窗口。如果我要控制窗体的边界样式,应该怎么办?</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><FONT size=3><B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">答:</SPAN></B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">属性</SPAN><SPAN lang=EN-US>BorderStyle</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">可以指定窗体边界的外观和行为。它一共有六种可能的取值。</SPAN></FONT></P><TABLE style="MARGIN-LEFT: 5.4pt; BORDER-COLLAPSE: collapse; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt" cellSpacing=0 cellPadding=0 border=0><TR><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 102.15pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=136><P class=MsoToc1 style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN lang=EN-US>bsDialog</SPAN></P></TD><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 272.4pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=363><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">表示大小不可变的标准的对话框边界。</SPAN></P></TD></TR><TR><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 102.15pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=136><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN lang=EN-US>bsSingle</SPAN></P></TD><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 272.4pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=363><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">表示大小不可变的单线边界。</SPAN></P></TD></TR><TR><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 102.15pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=136><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN lang=EN-US>bsNone</SPAN></P></TD><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 272.4pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=363><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">表示大小不可变、没有边界。</SPAN></P></TD></TR><TR><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 102.15pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=136><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN lang=EN-US>bsSizeable</SPAN></P></TD><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 272.4pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=363><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">表示标准的可改变大小的窗体。</SPAN></P></TD></TR><TR><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 102.15pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=136><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN lang=EN-US>bsToolWindow</SPAN></P></TD><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 272.4pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=363><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">与</SPAN><SPAN lang=EN-US>bsSingle</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">时类似,但是标题较小,用做工具框窗口。</SPAN></P></TD></TR><TR><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 102.15pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=136><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN lang=EN-US>bsSizeToolWin</SPAN></P></TD><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 272.4pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=363><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">与</SPAN><SPAN lang=EN-US>bsSizeable</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">时相似,<div id="gnagcugtmpjliceig">wZusInSj]n~\'f*Y业</div>但是标题较小,做工具框窗口。</SPAN></P></TD></TR></TABLE><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><FONT size=3><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">要注意的是,对于</SPAN><SPAN lang=EN-US>MDI</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">子窗体,</SPAN><SPAN lang=EN-US>bsDialog</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">或</SPAN><SPAN lang=EN-US>bsNone</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">将不起作用。</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN lang=EN-US><FONT size=3> <o:p></o:p></FONT></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><FONT size=3><B><SPAN lang=EN-US>3</SPAN></B><B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">)问:</SPAN></B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">同样是获得焦点,</SPAN><SPAN lang=EN-US>ActiveControl</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">与</SPAN><SPAN lang=EN-US>SetFocus()</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">有什么不同?</SPAN><SPAN lang=EN-US> </SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><FONT size=3><B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">答:</SPAN></B> <SPAN lang=EN-US>ActiveControl</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">是把焦点交给组件,它是一个属性。而</SPAN><SPAN lang=EN-US>SetFocus()</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">是组件主动要焦点,是一个方法。书写格式也不一样。例如,我们想使同样的一个</SPAN><SPAN lang=EN-US>Button1</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">获得焦点,可以下的两种写法:</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><FONT size=3><SPAN lang=EN-US>ActiveControl=Button1</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">或</SPAN><SPAN lang=EN-US>Button1=SetFocus()</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''"><FONT size=3>二者作用是一样的,不过一般都习惯用第一种方式。</FONT></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN lang=EN-US><FONT size=3> <o:p></o:p></FONT></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN lang=EN-US><FONT size=3> <o:p></o:p></FONT></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><FONT size=3><B><SPAN lang=EN-US>4</SPAN></B><B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">)问:</SPAN></B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">属性</SPAN><SPAN lang=EN-US>FormStyle</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">有什么作用?</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><FONT size=3><B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">答:</SPAN></B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">属性</SPAN><SPAN lang=EN-US>FormStyle</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">可以确定窗体的类型,它一共有四种属性值。</SPAN></FONT></P><TABLE style="MARGIN-LEFT: 5.4pt; BORDER-COLLAPSE: collapse; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt" cellSpacing=0 cellPadding=0 border=0><TR><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 79.45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=106><P class=MsoToc1 style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN lang=EN-US>fsNormal</SPAN></P></TD><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 317.8pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=424><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">表示窗体既不是</SPAN><SPAN lang=EN-US>MDI</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">父窗口也不是</SPAN><SPAN lang=EN-US>MDI</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">子窗口,只可能是单文档</SPAN><SPAN lang=EN-US>SDI</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">窗口或者对话框。这个属性值是缺省值。</SPAN></P></TD></TR><TR><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 79.45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=106><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN lang=EN-US>fsMDIChild</SPAN></P></TD><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 317.8pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=424><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">表示这个窗体是一个</SPAN><SPAN lang=EN-US>MDI</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">子窗口。</SPAN></P></TD></TR><TR><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 79.45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=106><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN lang=EN-US>fsMDIForm</SPAN></P></TD><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 317.8pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=424><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">表示这个窗体是一个</SPAN><SPAN lang=EN-US>MDI</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">父窗口。</SPAN></P></TD></TR><TR><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 79.45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=106><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN lang=EN-US>fsStayOnTop</SPAN></P></TD><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 317.8pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=424><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">表示窗体始终保持在窗体所属工程中其它窗体的上面,除非还有别的窗体的</SPAN><SPAN lang=EN-US>FormStyle</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">属性也被设置成了</SPAN><SPAN lang=EN-US>fsStayOnTop</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">。</SPAN></P></TD></TR></TABLE><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><FONT size=3><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">要特别注意的是,在程序运行期间不要修改窗体的</SPAN><SPAN lang=EN-US>FormStyle</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">属性。</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN lang=EN-US><FONT size=3> <o:p></o:p></FONT></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><FONT size=3><B><SPAN lang=EN-US>5</SPAN></B><B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">)问:</SPAN></B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">属性</SPAN><SPAN lang=EN-US>Position</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">有什么作用?</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><FONT size=3><B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">答:</SPAN></B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">属性</SPAN><SPAN lang=EN-US>Position</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">可以确定程序运行时出现在屏幕上的窗体的大小和位置,它有五种可能的取值。</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt; tab-stops: 95.4pt 365.4pt" align=left><FONT size=3><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>1</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">.</SPAN><SPAN lang=EN-US>poDesigned</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">表示使用设计时指定的尺寸和位置属性时显示窗体。尺寸属性是指</SPAN><SPAN lang=EN-US>Height</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">和</SPAN><SPAN lang=EN-US>Width</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">,位置属性是指</SPAN><SPAN lang=EN-US>Left</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">和</SPAN><SPAN lang=EN-US>Top</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">。这个属性值是缺省值。</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt; tab-stops: 95.4pt 365.4pt" align=left><FONT size=3><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>2</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">.</SPAN><SPAN lang=EN-US>poDefault</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">表示窗体在屏幕上显示的位置和大小由</SPAN><SPAN lang=EN-US><a target="_blank" href="http://www.malegebide.com" class="wordstyle">Windows</a></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">决定。每次运行应用程序时,窗体都会稍微向下向右移动。</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt; tab-stops: 95.4pt 365.4pt" align=left><FONT size=3><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>3</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">.</SPAN><SPAN lang=EN-US>poDefaultPosOnly</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">表示窗体以设计时的窗体尺寸显示窗体,但是在屏幕上显示的位置由</SPAN><SPAN lang=EN-US><a target="_blank" href="http://www.malegebide.com" class="wordstyle">Windows</a></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">确定。每次运行应用程序时,窗体都会稍微向下向右移动。当无法再向下移动时,就又会从屏幕的左上角开始显示。</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt; tab-stops: 95.4pt 365.4pt" align=left><FONT size=3><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>4</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">.</SPAN><SPAN lang=EN-US>poDefaultSizeOnly</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">表示窗体的位置由设计时指定的值确定,而尺寸由</SPAN><SPAN lang=EN-US><a target="_blank" href="http://www.malegebide.com" class="wordstyle">Windows</a></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">确定。</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt; tab-stops: 95.4pt 365.4pt" align=left><FONT size=3><SPAN lang=EN-US>5</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">.</SPAN><SPAN lang=EN-US>poScreenCenter</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">表示使用设计时指定的尺寸和位置属性,在屏幕的中央显示窗体。</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt; tab-stops: 95.4pt 365.4pt" align=left><SPAN lang=EN-US><FONT size=3> <o:p></o:p></FONT></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><FONT size=3><B><SPAN lang=EN-US>6</SPAN></B><B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">)问:</SPAN></B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">如何最大化或最小化窗体?</SPAN></FONT></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><FONT size=3><B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">答:</SPAN></B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">属性</SPAN><SPAN lang=EN-US><a target="_blank" href="http://www.malegebide.com" class="wordstyle">WindowS</a>tate</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">与窗体的显示有关,它有三种可能的取值。</SPAN></FONT></P><TABLE style="MARGIN-LEFT: 5.4pt; BORDER-COLLAPSE: collapse; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt" cellSpacing=0 cellPadding=0 border=0><TR><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 79.45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=106><P class=MsoToc1 style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN lang=EN-US>wsNormal</SPAN></P></TD><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 306.45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=409><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">窗体既不是最大化显示也不是最小化显示。这个值是缺省值。</SPAN></P></TD></TR><TR><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 79.45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=106><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN lang=EN-US>wsMinimized</SPAN></P></TD><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 306.45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=409><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: ''''Times New Roman''''; mso-hansi-font-family: ''''Times New Roman''''">窗体最小化显示。</SPAN></P></TD></TR><TR><TD style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 79.45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" vAlign=top width=106><P class=MsoNormal style="MA
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -