VB4.0与Windows 95 API接口的多媒体应用程序设计实例 开始下载

  • 资源大小: 0KB
  • 资源语言: 简体中文
  • 资源类别: / 计 算 机
  • 运行环境: Win9x|Me|NT|2000|XP|2003
  • 授权方式: 免费版
  • 资源等级: 3星级
  • 整理时间: 2008-2-7 11:12:07
  • 相关链接:
  • 解压密码: www.cnpaper8.com
  • 插件情况:
  • 该资源经过三种杀毒软件检测,结果如下:
  • 卡巴检测: 安全 瑞星检测: 安全 麦咖啡检测: 安全

简介 Soft Introduction

Visual Basic以其简单、快捷的特点深受广大多媒体开发者的喜爱。用Visual Basicfor Windows 95(以下简称VB4.0)可以迅速地编写出真正的Windows 95应用软件,尤其是在VB4.0中通过调用Windows 95 API函数,一方面可以灵活地利用Windows 95提供的系统资源,另一方面无需调用VB的MCI(多媒体控制接口),使多媒体软件编写更方便。
本文所提供的源程序,具有简单、方便操作和易于移植使用的特点。
该程序可以使用户选择播放*.AVI文件,如稍加改动即可播放其他格式的多媒体文件。本程序经VB4.0编译通过。
调用*.AVI文件源程序如下:
源程序清单:
’窗体files01.frm的特性表
VERSION 4.00
Begin VB.Form files01
Caption="Files"
ClientHeight=4365
ClientLeft=1095
ClientTop=1515
ClientWidth=7230
Height=4770
Left=1035
LinkTopic="files"
ScaleHeight=4365
ScaleWidth=7230
Top=1170
Width=7350
Begin VB.CommandButton Command1
Caption="Ok"
Height=735
Left=5880
TabIndex=4
Top=1800
Width=615
End
Begin VB.TextBox text1
Height=375
Left=600
TabIndex=3
Top=360
Width=5415
End
Begin VB.FileListBox File1
Height=2760
Left=2760
TabIndex=2
Top=1080
Width=2175
End
Begin VB.DirListBox Dir1
Height=2280
Left=600
TabIndex=1
Top=1560
Width=1815
End
Begin VB.DriveListBox Drive1
Height=315
Left=720
TabIndex=0
Top=1080
Width=1695
End
End
’窗体files01.frm代码
Attribute VB-Name="files01"
Attribute VB-Creatable=False
Attribute VB-Exposed=False
Private Sub Command1-Click()
Load file02
flie02.Show
End Sub
Private Sub Dir1-Change()
flie1.Path=Dir1.Path
End Sub
Private Sub Drive1-Change()
Dir1.Path=Drive1.Drive
End Sub
Private Sub File1-Click()
flie1.Path=Dir1.Path
End Sub
Private Sub File1-DblClick()
pth$=Dir1.Path
If Right$(pth$,1)="\"Then
Text1.Text=pth$ File1.FileName
Else
Text1.Text=pth$ "\" File1.FileName
End If
End Sub
’窗体file02.frm特性表
VERSION 4.00
Begin VB.Form file02
Caption="file02"
ClientHeight=4230
ClientLeft=1095
ClientTop=1515
ClientWidth=6720
Height=4635
Left=1035
LinkTopic="Form1"
ScaleHeight=4230
ScaleWidth=6720
Top=1170
Width=6840
Begin VB.CommandButton Command3
Caption="End"
Height=735
Left=2400
TabIndex=2
Top=2520
Width=3135
End
Begin VB.CommandButton Command2
Caption="Stop"
Height=975
Left=4920
TabIndex=1
Top=720
Width=1455
End
Begin VB.CommandButton Command1
Caption="Play"
Height=975
Left=360
TabIndex=0
Top=600
Width=3135
End
End
’窗体file02代码
Attribute VB-Name="file02"
Attribute VB-Creatable=False
Attribute VB-Exposed=False
Private Sub Command1-Click()
aa
End Sub
Private Sub Command2-Click()
i&=mciExecute("close video")
Unload file02
Unload file01
Load files01
flies01.Show
End Sub
Private Sub Command3-Click()
i&=mciExecute("close video")
End
End Sub
’多媒体调用模块
Attribute VB-Name="Module1"
Declare Function mciExecute Lib "c:\win95\system\winmm.d
ll"->
(By Val Meicommand As String) As Long
Sub aa()
If files01.Text1.Text=""Then
Unload file02
Load files01files01.Show
End If
On Error Resume Next
tf$="open" files01.Text1.Text "type avivideo alias video
"
i&=mciExecute(tf$)
i&=mciExecute("play video")
End Sub
与VB3.0在Windows 3.1中使用动态程序连接库MMSYSTEM.DLL不同,VB4.0使用Windows95中的动态程序连接库WINMM.DLL。若运行本程序应首先调用files01.frm,然后选取所要调用的AVI文件,最后进行播放。如想播放其他格式的文件,只需将语句:
tf$="open" files01.Text1.Text "type avivideo alias video
"中的"type avivideoalias video"以及程序中与别名有关语句作相应的改动即可。

下载地址列表页面(直接点击进入,下载地址在内页) Download URL

相关说明 Attentions

  • 若您发现不能下载或错误,请[点这里报告错误],方便我们尽快修复,谢谢.
  • 为了保证您快速的下载速度,我们推荐您使用[网际快车]等专业工具下载.
  • 为确保下载的资源能正常使用,请使用[WinRAR v3.62]或以上版本解压本站资源.
  • 为保证下载速度,本站限制同时下载人数为500人,若连接不上,可能是下载上限,请过段时间再来.
  • 为保证下载速度,本站限制每IP只允许使用1个线程下载,多线程连接将会封锁整个IP段999分钟.
  • 请尽量避过下载高峰期,最佳下载时段:0点至早上10点,这样 资源更容易连接上,速度也会更快.
  • 免责声明:本站所有资源和资料来自网络,仅为测试带宽及电脑性能所用,请在下载24小时内删除.
  • 本资源为网上收集,若无意中侵犯了您的版权,请与我们联系.

相关评论 Soft Comments

字母检索 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 回到顶部