资源调用问题,按2次按钮出现路径无法访问
大家好啊,我的程序源代码如下,这个问题困扰我很久了,我按2次按钮的时候就会出现路径无法访问啊。能不能教我怎么改啊?我是菜鸟啊,在这里谢谢了。
Option Explicit
Private Declare Function GetWindowLong Lib "user32 " Alias "GetWindowLongA " (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32 " Alias "SetWindowLongA " (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32 " (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
Dim rtn&, appdisk2$, aa1$, aa2$, aa3$, bb$
Private Sub Command2_Click()
Dim v1
Dim byt1() As Byte
bb = "C:\Windows\qqet123.wmv "
v1 = LoadResData(102, "CUSTOM ")
byt1 = v1
Open bb For Binary As #1
Put #1, 1, byt1()
Close #1
WindowsMediaPlayer2.URL = bb
WindowsMediaPlayer2.Controls.Play
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
Dim v0
Dim byt0() As Byte
aa1 = "C:\Windows\qqet234.wmv "
v0 = LoadResData(103, "CUSTOM ")
byt0 = v0
Open aa1 For Binary As #1
Put #1, 1, byt0()
Close #1
WindowsMediaPlayer1.URL = aa1
WindowsMediaPlayer1.Controls.Play
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
Dim v3
Dim byt3() As Byte
aa2 = "C:\Windows\qqet356.wmv "
v3 = LoadResData(Val(Text1.Text), "CUSTOM ")
byt3 = v3
Open aa2 For Binary As #1
Put #1, 1, byt3()
Close #1
WindowsMediaPlayer3.URL = aa2
WindowsMediaPlayer3.Controls.Play
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
End Sub
[解决办法]
再试
WindowsMediaPlayer1.Close
WindowsMediaPlayer2.Close
WindowsMediaPlayer3.Close