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

📄 vb14.htm

📁 从太平洋上下载下来的打包学习VB的教程。 》VB专区 ·Visual Basic 的数据库编程 ·使用VB建立Web Server   ·VB与Windows资源管理器互拷文件
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0057)http://www.pconline.com.cn/experience/subject/VB/vb14.htm -->
<HTML><HEAD><TITLE>|><| 太平洋电脑信息网</TITLE><!-- #BeginTemplate "/Templates/0723.dwt" --><!-- #BeginEditable "doctitle" --><!-- #EndEditable -->
<META content="text/html; charset=gb2312" http-equiv=Content-Type><LINK 
href="vb14.files/text.css" rel=stylesheet>
<STYLE type=text/css>.sfont {
	LINE-HEIGHT: 18pt
}
</STYLE>

<META content="MSHTML 5.00.2014.210" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width="100%">
  <TBODY>
  <TR>
    <TD vAlign=top width="100%">
      <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
        <TBODY>
        <TR bgColor=#303880>
          <TD><A href="http://www.pconline.com.cn/"><IMG alt=太平洋电脑信息网 border=0 
            height=18 hspace=30 src="vb14.files/txtpconline.gif" 
            width=96></A><IMG height=10 src="vb14.files/blank.gif" 
        width=400></TD></TR></TBODY></TABLE></TD>
    <TD align=right background=vb14.files/bw.gif noWrap width=130><IMG 
      height=26 src="vb14.files/bw.gif" width=10><A 
      href="http://www.pconline.com.cn/sitemap/"><IMG alt=网站地图 border=0 
      height=26 src="vb14.files/sitemap.gif" width=21></A><IMG height=26 
      src="vb14.files/bw.gif" width=10><A 
      href="http://www.pconline.com.cn/tpy/"><IMG alt=关于太平洋 border=0 height=26 
      src="vb14.files/aboutus.gif" width=21></A><IMG height=26 
      src="vb14.files/bw.gif" width=10><A 
      href="http://www.pconline.com.cn/tpy/tariff.html"><IMG alt=与我们联系 border=0 
      height=26 src="vb14.files/contact.gif" width=21></A><IMG height=26 
      src="vb14.files/bw.gif" width=10></TD></TR></TBODY></TABLE><BR>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=760>
  <TBODY>
  <TR>
    <TD bgColor=#666666><IMG height=1 src="vb14.files/blank.gif" width=1></TD>
    <TD bgColor=#666666><IMG height=1 src="vb14.files/blank.gif" width=1></TD>
    <TD>&nbsp;</TD>
    <TD colSpan=2 noWrap><A 
      href="http://www.pconline.com.cn/experience/index.html"><IMG 
      align=absBottom alt=企业之窗 border=0 height=15 
      src="vb14.files/txtexperience.gif" width=68></A> <A 
      href="http://www.pconline.com.cn/">首  页</A> <A 
      href="http://www.pconline.com.cn/market/">今日报价</A> <A 
      href="http://www.pconline.com.cn/recommend/">产品推介</A> <A 
      href="http://www.pconline.com.cn/yp/">企业之窗</A> <A 
      href="http://www.pconline.com.cn/news/">科技新闻</A> <A 
      href="http://www.pconline.com.cn/product/">产品查询</A> <A 
      href="http://www.pconline.com.cn/download/">软件下载</A></TD></TR>
  <TR>
    <TD><IMG height=1 src="vb14.files/blank.gif" width=1></TD>
    <TD><IMG height=1 src="vb14.files/blank.gif" width=1></TD>
    <TD><IMG height=1 src="vb14.files/blank.gif" width=21></TD>
    <TD bgColor=#ffa000 colSpan=2><IMG height=1 src="vb14.files/blank.gif" 
      width=1></TD></TR>
  <TR>
    <TD bgColor=#666666><IMG height=1 src="vb14.files/blank.gif" width=1></TD>
    <TD bgColor=#cdcdcd><IMG height=5 src="vb14.files/blank.gif" width=1></TD>
    <TD align=right colSpan=3><IMG height=6 src="vb14.files/ffa000.gif" 
      width=1></TD></TR>
  <TR>
    <TD bgColor=#666666><IMG height=1 src="vb14.files/blank.gif" width=1></TD>
    <TD align=right><A href="http://www.pconline.com.cn/"><IMG alt=太平洋电脑信息网 
      border=0 height=35 src="vb14.files/pconline.com.cn.gif" vspace=10 
      width=162></A></TD>
    <TD>&nbsp;</TD>
    <TD vAlign=bottom><!-- #BeginEditable "important_news" --><IMG height=40 
      src="vb14.files/blank.gif" width=350><!-- #EndEditable --></TD>
    <TD align=right vAlign=top><!-- #BeginEditable "adv_top" --><IMG alt=广告位 
      height=43 src="vb14.files/icon.gif" 
  width=190><!-- #EndEditable --></TD></TR></TBODY></TABLE>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=760>
  <TBODY>
  <TR>
    <TD bgColor=#666666 width=1><IMG height=1 src="vb14.files/blank.gif" 
      width=1></TD>
    <TD vAlign=top width=170><!-- #BeginEditable "addons" --><!--替代为附加信息 --><!-- #EndEditable --></TD>
    <TD bgColor=#666666 width=1><IMG height=1 src="vb14.files/blank.gif" 
      width=1></TD>
    <TD><IMG height=1 src="vb14.files/blank.gif" width=21></TD>
    <TD colSpan=3 vAlign=top width=566><!-- #BeginEditable "1" --><IMG 
      height=1 src="vb14.files/blank.gif" width=566><BR><IMG height=1 
      src="vb14.files/666666.gif" width=420><BR><IMG height=13 
      src="vb14.files/blank.gif" width=1><A 
      href="http://www.pconline.com.cn/experience/">经验共享</A> &gt; <SPAN 
      class=greenb><A 
      href="http://www.pconline.com.cn/experience/subject/VB/index.html">专题教程</A></SPAN><A 
      href="http://www.pconline.com.cn/experience/subject/VB/index.html"> 
      VB专区</A>&gt; <BR><IMG height=1 src="vb14.files/666666.gif" vspace=1 
      width=420><BR>
      <P><B><FONT color=#000066><SPAN class=sfont>用VB 设 计VCD 播 放 
      器</SPAN></FONT></B> </P>
      <P><SPAN class=sfont>傅 能 红 </SPAN></P>
      <P><SPAN class=sfont><FONT color=#ffffff>----</FONT> 本 人 在 电 脑 报 上 发 现 一 个 
      非 常 实 用 的VB 小 程 序 经 过 一 定 的 修 改 后, 不 敢 独 享, 奉 献 给 诸 位。 </SPAN>
      <P><SPAN class=sfont><FONT color=#ffffff>----</FONT> 该 程 序 通 过VB 的 多 媒 体 控 
      件MCI32.OCX 可 以 打 开MPEG 压 缩 文 件( 如VCD2.0 版 的.DAT 文 件) 来 实 现 一 个VCD 播 放 器 的 
      设 计 </SPAN>
      <P><SPAN class=sfont><FONT color=#ffffff>----</FONT> 首 先 必 须 确 保 在 你 
      的Windows 系 统 中SYSTEM.INI 文 件 关 于[MCI] 中 需 有MPEGVideo 项( 一 般Windows 95 
      和Windows 98 中 均 有 此 项) 。 </SPAN>
      <P><SPAN class=sfont><FONT color=#ffffff>----</FONT> 其 次 在VB 中 建 立 一 个 新 窗 
      口, 加 入 多 媒 体 部 件Microsoft Multimedia Control 5.0( 位 
      于C:\Windows\System\MCI32.OCX), 以 及 对 话 框 部 件 Microsoft Common Dialog 
      Control 5.0( 位 于C:\Windows\System\COMMONDLG32.OCX), 将MCI 控 件 拖 放 至 窗 体Form 
      上, 调 整 其 大 小, 并 将 窗 体 的 大 小 也 调 整 为 与 其 同 样 大 小; 将 其 九 个 按 钮( 从 左 至 右 
      为:Prev、Next、Play、Pause、Back、Step、Stop、Record 和 Eject) 中 的Record 按 钮 
      的Visible 属 性 设 为False, 其 余 按 钮 中 的Visible 属 性 和Enabled 属 性 设 为True , 以 上 按 
      钮 的 设 置 可 通 过MMControl 的 属 性 栏 内" 自 定 义" 项 来 设 置。 对 话 框 控 件 的DefaultExt 属 
      性 设 为.DAT, DialogTitle 属 性 设 为" 打 开 多 媒 体 文 件", Filter 属 性 设 为"*.DAT, 
      *.WAV", InitDir 属 性 设 为"G:\MPEGAV"( 假 设 光 驱 盘 符 为G) 。 </SPAN>
      <P><SPAN class=sfont><FONT color=#ffffff>----</FONT> 源 代 码 如 下: </SPAN><PRE><SPAN class=sfont>
Option Explicit
Private Sub Form_Load()
  Dim Response As Integer
  MMControl1.DeviceType = "MPEGVideo"
  CommonDialog1.ShowOpen    
  '通过对话框选择不同的VCD文件
  MMControl1.filename = CommonDialog1.filename
   '选定要播放的文件
  MMControl1.Command = "Open"
  MMControl1.Command = "Play"
  
End Sub
Private Sub Form_Unload(Cancel As Integer)
  MMControl1.Command = "close"
End Sub
Private Sub MMControl1_BackClick(Cancel As Integer)
 '对Back按钮的功能改进
  Dim i As Integer
  i = MMControl1.Position - 100  
  '数值100为后退量,可适当调整
  If i &lt; 0 Then
    MMControl1.From = 0
  Else
    MMControl1.From = i
  End If
  MMControl1.Command = "Play"
  
End Sub
Private Sub MMControl1_StepClick(Cancel As Integer) 
'对Step按钮的功能改进
  Dim j As Integer
  j = MMControl1.Position + 100 
  '数值100为前进量,可适当调整
  If j &gt; MMControl1.Length Then
    MMControl1.From = MMControl1.Length
  Else
    MMControl1.From = j
  End If
  MMControl1.Command = "Play"
End Sub
</SPAN></PRE>
      <P><SPAN class=sfont><FONT color=#ffffff>----</FONT> MCI 控 件 还 有 很 多 属 性, 
      如 画 面 播 放 位 置hWndDisplay 属 性 等 等, 大 家 可 参 阅 相 关 资 料 自 行 摸 索。 </SPAN>
      <P><SPAN class=sfont><FONT color=#ffffff>----</FONT> 调 整 好 窗 体 的 标 题、 图 标、 
      颜 色 等, 然 后 编 译 成 .EXE 文 件, 你 就 可 以 在Windows 下 拥 有 自 己 的VCD 播 放 器 了。 
</SPAN>
      <P align=right><A 
      href="http://www.pconline.com.cn/experience/subject/VB/index.html">----更多的文章</A> 
<!-- #EndEditable --></P></TD></TR></TBODY></TABLE>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=760>
  <TBODY>
  <TR>
    <TD bgColor=#666666 width=1><IMG height=1 src="vb14.files/blank.gif" 
      width=1></TD>
    <TD align=right vAlign=bottom width=170><IMG height=10 
      src="vb14.files/blank.gif" width=170><BR></TD>
    <TD bgColor=#666666 width=1><IMG height=1 src="vb14.files/blank.gif" 
      width=1></TD>
    <TD width=21><IMG height=1 src="vb14.files/blank.gif" width=21></TD>
    <TD bgColor=#eeeeee width=566><IMG height=10 src="vb14.files/blank.gif" 
      width=566><BR>版权所有&copy;1999 太平洋电脑信息网<BR><FONT 
      face="Arial, Helvetica, sans-serif"><A 
      href="mailto:exp@pconline.com.cn">exp@pconline.com.cn</A></FONT> <IMG 
      height=1 src="vb14.files/hhvisit.html" width=1> </TD></TR></TBODY></TABLE><!-- #EndTemplate --></BODY></HTML>

⌨️ 快捷键说明

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