Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 7 x64上的VB6应用程序参考WMP_Vb6_Windows 7 X64_Wmp - Fatal编程技术网

Windows 7 x64上的VB6应用程序参考WMP

Windows 7 x64上的VB6应用程序参考WMP,vb6,windows-7-x64,wmp,Vb6,Windows 7 X64,Wmp,我帮助开发了一个程序,它可以让玩家在全屏游戏打开时管理他们的音乐等。以前,我在表单上有一个WMP控件的不可见副本,我只是操纵该副本以产生所需的效果,但现在我收到了用户的请求,要求删除WMP控件,以便他们可以将软件放在专用服务器上。我的问题是,如何通过删除控件来维护WMP支持,而是添加对msdxm.ocx或WMP.dll(或两者)的引用,并在运行时创建WMP对象 我处理的系统范围从98-W7。使用wmp.dll和msdxm.ocx签入引用 我已经试过了: Dim WMP as New Window

我帮助开发了一个程序,它可以让玩家在全屏游戏打开时管理他们的音乐等。以前,我在表单上有一个WMP控件的不可见副本,我只是操纵该副本以产生所需的效果,但现在我收到了用户的请求,要求删除WMP控件,以便他们可以将软件放在专用服务器上。我的问题是,如何通过删除控件来维护WMP支持,而是添加对msdxm.ocx或WMP.dll(或两者)的引用,并在运行时创建WMP对象

我处理的系统范围从98-W7。使用wmp.dll和msdxm.ocx签入引用

我已经试过了:

Dim WMP as New WindowsMediaPlayer '(invalid use of Keyword New)

Dim WMP as WindowsMediaPlayer 
Set WMP = CreateObject("WMPlayer.OCX.7") '(failed to create WMP object)
这是谷歌搜索了4个小时后返回最多的两个搜索结果,因此感谢您的帮助。根据我从WMP的v11+中发现的情况,所有人都停止支持VB6了,有人能证实这一点吗?如果有,请告诉我解决方法

沮丧但感激


-奥斯汀

试试这样

Private Sub Form_Load()
    Dim oWMP As Object
    Set oWMP = Controls.Add("WMPlayer.OCX", "wmpPlayer1")
    oWMP.Move 0, 0, ScaleWidth, ScaleHeight
    oWMP.Visible = True
End Sub

试试这样的

Private Sub Form_Load()
    Dim oWMP As Object
    Set oWMP = Controls.Add("WMPlayer.OCX", "wmpPlayer1")
    oWMP.Move 0, 0, ScaleWidth, ScaleHeight
    oWMP.Visible = True
End Sub

键入此命令时以VB6形式运行Media Player 11的实例。我认为您真正遇到的是64位问题,而不是WMP与VB6的问题。键入此内容时,以VB6格式运行Media Player 11的实例。我认为您真正遇到的是64位问题,而不是WMP与VB6的问题。