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

📄 c++ builder 程序设计实用教程 - 8_1_2 display属性111 - 张晋 - 17xie.htm

📁 已经消失的不易找到的C++ builder网络教程总结
💻 HTM
📖 第 1 页 / 共 2 页
字号:
lang=EN-US>8-6</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示的组件及窗体布局,设置相应的组件和窗体的属性,然后进入下一步。</SPAN></P>
<P class=MsoNormalIndent><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在程序的设计阶段,用鼠标的左键双击窗体的空白处,在屏幕上就会弹出一个代码窗口,缺省的情况下,光标应该位于在窗体的</SPAN><SPAN 
class=SpellE><SPAN lang=EN-US>FormCreate</SPAN></SPAN><SPAN 
lang=EN-US>()</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">事件的过程处理代码段中,在程序的适当位置添加下列代码:</SPAN></P>
<P class=a0><SPAN class=GramE><SPAN lang=EN-US>void</SPAN></SPAN><SPAN 
lang=EN-US> __<SPAN class=SpellE>fastcall</SPAN> TForm1::FormCreate(<SPAN 
class=SpellE>TObject</SPAN> *Sender)</SPAN></P>
<P class=a0><SPAN lang=EN-US>{</SPAN></P>
<P class=a0><SPAN lang=EN-US>Form1-&gt;MediaPlayer1-&gt;<SPAN 
class=SpellE>AutoEnable</SPAN>=true;</SPAN></P>
<P class=a0><SPAN lang=EN-US>//</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">自动检测有效状态</SPAN></P>
<P class=a0><SPAN lang=EN-US>Form1-&gt;MediaPlayer1-&gt;<SPAN 
class=SpellE>DeviceType</SPAN>=<SPAN class=SpellE>dtAVIVideo</SPAN>;</SPAN></P>
<P class=a0><SPAN lang=EN-US>//</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">设置播放设备类型</SPAN></P>
<P class=a0><SPAN lang=EN-US>Form1-&gt;MediaPlayer1-&gt;<SPAN 
class=SpellE>FileName</SPAN>="d:\\ASP\</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">聊天室</SPAN><SPAN 
lang=EN-US>\\Clock.avi";</SPAN></P>
<P class=a0><SPAN lang=EN-US>//</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">设置打开的文件名</SPAN></P>
<P class=a0><SPAN lang=EN-US>Form1-&gt;MediaPlayer1-&gt;<SPAN 
class=GramE>Open(</SPAN>);</SPAN></P>
<P class=a0><SPAN lang=EN-US>//</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">打开多媒体播放设备</SPAN></P>
<P class=a0><SPAN 
lang=EN-US>Form1-&gt;MediaPlayer1-&gt;Display=Form1-&gt;Panel1;</SPAN></P>
<P class=a0><SPAN lang=EN-US>//</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">设置播放容器</SPAN></P>
<P class=a0><SPAN lang=EN-US>}</SPAN></P>
<P class=a0><SPAN 
lang=EN-US>//-----------------------------------------------------------------------</SPAN></P>
<P class=MsoNormalIndent><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">程序说明:</SPAN></P>
<P class=MsoNormalIndent><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在添加的程序中,需要注意的是语句</SPAN><SPAN 
lang=EN-US>Form1-&gt;MediaPlayer1-&gt;Display=Form1-&gt;Panel1;</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">它的作用是为程序中播放动画指定一个容器,在本程序中指定的动画播放容器为一个</SPAN><SPAN 
lang=EN-US>Panel1</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">组件。</SPAN></P>
<P class=MsoNormalIndent><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">做完以上的工作后,选择菜单</SPAN><SPAN 
lang=EN-US>File</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中的</SPAN><SPAN 
lang=EN-US>Save All</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">选项,在弹出的对话框中选择一个合适的文件名来保存文件。在键盘上按下功能键</SPAN><SPAN 
lang=EN-US>F9</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">运行程序,程序运行的初始画面如图</SPAN><SPAN 
lang=EN-US>8-7</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示。</SPAN></P>
<P class=a><SPAN lang=EN-US><IMG height=238 
src="C++ Builder 程序设计实用教程 - 8_1_2 Display属性111 - 张晋 - 17xie.files/f671731d6d.jpg" 
width=269 v:shapes="_x0000_i1027"></SPAN></P>
<P class=MsoCaption><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图</SPAN><SPAN 
lang=EN-US>8-7<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">程序运行初始画面</SPAN></P>
<P class=MsoNormalIndent><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">用鼠标的左键单击</SPAN><SPAN 
lang=EN-US>Play</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">按钮,在按钮组件上就会播放指定的动画文件,程序运行结果如图</SPAN><SPAN 
lang=EN-US>8-8</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示。</SPAN></P>
<P class=a><SPAN lang=EN-US><IMG height=260 
src="C++ Builder 程序设计实用教程 - 8_1_2 Display属性111 - 张晋 - 17xie.files/5c6ebea6b5.jpg" 
width=244 v:shapes="_x0000_i1028"><SPAN 
style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><IMG 
height=260 
src="C++ Builder 程序设计实用教程 - 8_1_2 Display属性111 - 张晋 - 17xie.files/dfb64cdcac.jpg" 
width=244 v:shapes="_x0000_i1029"></SPAN></P>
<P class=MsoCaption><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图</SPAN><SPAN 
lang=EN-US>8-8<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">程序运行结果(</SPAN><SPAN 
class=SpellE><SPAN lang=EN-US>Clock.avi</SPAN></SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">)</SPAN></P>
<P class=MsoNormal><SPAN 
lang=EN-US><o:p>&nbsp;</o:p></SPAN></P></DIV></DIV></CENTER>
<HR>
<SPAN id=theurl 
style="FONT-SIZE: 12px">本页地址:http://www.17xie.com/read.php?pid=13699</SPAN> 
</DIV>
<DIV id=read-title style="BORDER-TOP: white 1px solid">
<DIV 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FLOAT: right; PADDING-BOTTOM: 8px; PADDING-TOP: 8px">
<TABLE>
  <TBODY>
  <TR>
    <TD><NOBR><SPAN class=page-nor 
      onclick="window.location.href='/read.php?bid=303&amp;seq=1'">|&lt;</SPAN> 
      <SPAN class=page-nor 
      onclick="window.location.href='/read.php?bid=303&amp;seq=78'">上一页</SPAN> 
      <SPAN class=page-nor 
      onclick="window.location.href='/read.php?bid=303&amp;seq=76'">76</SPAN> 
      <SPAN class=page-nor 
      onclick="window.location.href='/read.php?bid=303&amp;seq=77'">77</SPAN> 
      <SPAN class=page-nor 
      onclick="window.location.href='/read.php?bid=303&amp;seq=78'">78</SPAN> 
      <SPAN class=page-here 
      onclick="window.location.href='/read.php?bid=303&amp;seq=79'">79</SPAN> 
      <SPAN class=page-nor 
      onclick="window.location.href='/read.php?bid=303&amp;seq=80'">80</SPAN> 
      <SPAN class=page-nor 
      onclick="window.location.href='/read.php?bid=303&amp;seq=81'">81</SPAN> 
      <SPAN class=page-nor 
      onclick="window.location.href='/read.php?bid=303&amp;seq=82'">82</SPAN> 
      <SPAN class=page-nor 
      onclick="window.location.href='/read.php?bid=303&amp;seq=80'">下一页</SPAN> 
      <SPAN class=page-nor 
      onclick="window.location.href='/read.php?bid=303&amp;seq=105'">&gt;|</SPAN></NOBR>.</TD>
    <TD><INPUT class=input-text 
      onkeydown='if(window.event.keyCode==13)window.location.href="/read.php?bid=303&amp;seq="+this.value' 
      style="WIDTH: 25px"></TD>
    <TD style="PADDING-TOP: 2px">[共105页]</TD></TR></TBODY></TABLE></DIV></DIV>
<DIV id=read-mpage>
<DIV 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 8px; PADDING-TOP: 8px; TEXT-ALIGN: center">[关注本页] 
[在本页中加入书签] [收藏本书] [推荐本书] </DIV></DIV><!-- foot -->
<DIV id=xie_bottom><A class=xie1 href="http://www.17xie.com/help/help-wzjs.html" 
target=_blank>关于我们</A> <SPAN class=xiefont1>| </SPAN><A class=xie1 
href="http://www.17xie.com/help/index.html" target=_blank>帮助中心</A> <SPAN 
class=xiefont1>| </SPAN><A class=xie1 
href="http://www.17xie.com/help/help-wzjs.html#m6" target=_blank>版权声明</A> <SPAN 
class=xiefont1>| </SPAN><A class=xie1 
href="http://www.17xie.com/help/help-wzjs.html#m7" target=_blank>免责声明</A> <SPAN 
class=xiefont1>| </SPAN><A class=xie1 
href="http://www.17xie.com/help/help-wzjs.html#m8" target=_blank>联系我们</A> <SPAN 
class=xiefont1>| </SPAN><A class=xie1 
href="http://www.17xie.com/help/help-wzjs.html#m9" target=_blank>友情链接</A> <SPAN 
class=xiefont1>| </SPAN><A class=xie1 
href="http://www.17xie.com/bbs/show_bbs.php?fid=130"><FONT 
color=red>提交意见</FONT></A> <BR>Copyright <SPAN 
style="FONT-FAMILY: arial">©</SPAN> 2007 17xie.com 互联网协同写书平台<BR>
<SCRIPT language=javascript 
src="C++ Builder 程序设计实用教程 - 8_1_2 Display属性111 - 张晋 - 17xie.files/1261343.js" 
type=text/javascript></SCRIPT>
<NOSCRIPT><A href="http://www.51.la/?1261343" target=_blank><IMG 
style="BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none" 
alt=我要啦免费统计 
src="C++ Builder 程序设计实用教程 - 8_1_2 Display属性111 - 张晋 - 17xie.files/go.htm"></A></NOSCRIPT> 
</DIV></DIV>
<SCRIPT>			setInterval("ajax_sr('/live.php','')",600000);			function chcolor(sz)			{				$('read-conts').style.backgroundColor = sz;			}						function clcp()			{				var rng = document.body.createTextRange();		        rng.moveToElementText(document.getElementById("theurl"));		        rng.execCommand("Copy");			}			document.body.onkeydown = clcp;			document.body.onmouseout = clcp;			document.body.onclick = clcp;					</SCRIPT>
</BODY></HTML>

⌨️ 快捷键说明

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