我正在使用 mciSendString 播放视频,但我无法在视频顶部放置任何控件,例如标签或按钮。如何在视频顶部放置另一个控件?
下面是代码:
公开课形式1
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer,ByVal hwndCallback As Integer) As Integer
将文件名变暗为字符串
Dim retVal As Integer
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click filename = Chr(34) & "D:\farm.wmv" & Chr(34) retVal = mciSendString("open " & filename & " type mpegvideo alias movie parent " & Panel1.Handle.ToInt32 & " style child", 0, 0, 0) retVal = mciSendString("put movie window at 0 0 201 127", 0, 0, 0) retVal = mciSendString("play movie", 0, 0, 0) End Sub End Class
之前:(按钮 1 可见)
之后:(按钮 1 不再可见)