vb打开文件的方法

各位高手帮帮忙:
用CommonDialog1控件,打开FLASH文件,“文件”-“打开”-出现一个对话框,找到flash文件并单击选中,再按“确定”,就能播放了
还有flash全屏播放怎么实现呢?
谢谢了!!!
各位,全屏播放怎么实现呢?急!!谢谢!!

'"工程"-"部件",加入以下2个控件
''Microsoft Common Dialog Control 6.0
''Shockwave Flash
'按CTRL+E,建立菜单,"文件"-"打开","打开"的名称为T_Open
'拷入以下代码
Private Sub Form_Load()
With ShockwaveFlash1
.Width = Form1.Width
.Height = Form1.Height - 800
.Top = 0
.Left = 0
End With
End Sub

Private Sub Form_Resize()
With ShockwaveFlash1
.Width = Form1.Width
.Height = Form1.Height - 800
.Top = 0
.Left = 0
End With
End Sub

Private Sub T_Open_Click()
With CommonDialog1
.FileName = ""
.Filter = "Flash文件(*.swf)|*.swf"
.FilterIndex = 1
End With
CommonDialog1.ShowOpen
If CommonDialog1.FileName = "" Then
Exit Sub
End If

ShockwaveFlash1.Movie = CommonDialog1.FileName
ShockwaveFlash1.ScaleMode = 2
ShockwaveFlash1.Quality = 1
End Sub
温馨提示:答案为网友推荐,仅供参考
第1个回答  2009-12-08
commondialog1.open就能实现
注意要把打开的格式写好
相似回答