vb网络视频播放源码(vb怎么播放视频)
本文目录一览:
VB播放视频文件代码
将以下文本 复制到 记事本里 然后另存为form1.frm
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3480
ClientLeft = 60
ClientTop = 450
ClientWidth = 8460
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
ScaleHeight = 3480
ScaleWidth = 8460
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.FileListBox File1
Height = 2430
Left = 1200
TabIndex = 3
Top = 600
Width = 6975
End
Begin VB.TextBox Text1
Height = 375
Left = 1200
TabIndex = 1
Text = "Text1"
Top = 120
Width = 6975
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 600
Left = 120
TabIndex = 0
Top = 720
Width = 990
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 240
Top = 1440
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "视频文件名最好不要带空格"
Height = 315
Left = 3240
TabIndex = 4
Top = 3120
Width = 2520
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "播放器路径"
Height = 195
Left = 120
TabIndex = 2
Top = 240
Width = 900
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
CommonDialog1.ShowOpen
Text1.Text = CommonDialog1.FileName
End Sub
Private Sub File1_DblClick()
On Error Resume Next
s = " " File1.Path "\" File1.List(File1.ListIndex)
x = Shell(Text1.Text s, 1)
Resume
End Sub
Private Sub Form_Load()
'添加microsoft Common Dialog control 控件
'commandbox textbox filelistbox
Command1.Caption = "选择播放器路径"
File1.Path = App.Path
File1.Pattern = "*.rmvb;*.wmv;*.mpg;*.avi;*.rm"
End Sub
请问一下用vb做个视频播放器代码怎么写!
工程-部件,选择Windows Media Player
在窗口上创建这个控件
代码:
Private Sub Form_Load()
WindowsMediaPlayer1.windowlessVideo = True
WindowsMediaPlayer1.URL = "C:\123.avi"
End Sub
网络视频直播播放器代码怎么写?
用VB的多媒体控件设计一个播放器,要可以播放视频文件的,小弟在此谢谢各位高手了! 搜索:vb源码 播放器 多的是 . ,Please for example .
vb视频播放器源码
用Windows media player 控件vb网络视频播放源码! 很简单的 不过支持的格式好像需要更新
windows media player 控件的常用属性及方法
属性/方法 说明
URL:String; 指定媒体位置vb网络视频播放源码,本机或网络地址
uiMode:String; 播放器界面模式vb网络视频播放源码,可为Full, Mini, None, Invisible
playState:integer; 播放状态,1=停止,2=暂停,3=播放,6=正在缓冲,9=正在连接,10= 准备就绪
enableContextMenu:Boolean; 启用/禁用右键菜单
fullScreen:boolean; 是否全屏显示
[controls] wmp.controls 播放器基本控制
controls.play; 播放
controls.pause; 暂停
controls.stop; 停止
controls.currentPosition:double; 当前进度
controls.currentPositionString:string; 当前进度,字符串格式。如“00:23”
controls.fastForward; 快进
controls.fastReverse; 快退
controls.next; 下一曲
controls.previous; 上一曲
[settings] wmp.settings 播放器基本设置
settings.volume:integer; 音量,0-100
settings.autoStart:Boolean; 是否自动播放
settings.mute:Boolean; 是否静音
settings.playCount:integer; 播放次数
[currentMedia] wmp.currentMedia 当前媒体属性
currentMedia.duration:double; 媒体总长度
currentMedia.durationString:string; 媒体总长度,字符串格式。如“03:24”
currentMedia.getItemInfo(const string); 取当前媒体信息"Title"=媒体标题,"Author"=艺术家,"Copyright"=版权信息,"Description"=媒体内容描述,"Duration"=持续时间(秒),"FileSize"=文件大小,"FileType"=文件类型,"sourceURL"=原始地址
currentMedia.setItemInfo(const string); 通过属性名设置媒体信息
currentMedia.name:string; 同 currentMedia.getItemInfo("Title")
[currentPlaylist] wmp.currentPlaylist //当前播放列表属性
currentPlaylist.count:integer; 当前播放列表所包含媒体数
currentPlaylist.Item[integer]; 获取或设置指定项目媒体信息,其子属性同wmp.currentMedia