有人可以帮助我在VB下运行Windows Media Player吗? [英] Can someone help me get the Windows Media Player running under VB?

查看:183
本文介绍了有人可以帮助我在VB下运行Windows Media Player吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我到目前为止所做的:

This is what I've got so far:

Imports WMPLib

Module modWmp
    Public wmPlayer As New WindowsMediaPlayer

    Sub SetupWmp()
        wmPlayer.uiMode = "invisible"
    End Sub

    Sub StopWmp()
        If (wmPlayer.playState = WMPLib.WMPPlayState.wmppsPlaying) Then
            wmPlayer.IWMPControls.stop()
        End If
    End Sub

    Sub StartWmp()
        wmPlayer.openPlayer("x:\Music\Lindsey Buckingham\unknown\Never Going Back Again (axs).mp3")
    End Sub
End Module

我首先运行SetupWmp例程,然后运行StartWmp。我没有收到错误,但是行"wmPlayer.uiMode ='invisible'"没有效果。当StartWmp运行时,播放器出现。

I run the SetupWmp routine first, then StartWmp. I don't get an error, but the line "wmPlayer.uiMode = 'invisible'" has no effect. The player appears when the StartWmp thing runs.

Robert Homes

Robert Homes

推荐答案

axWmp.openPlayer()用于打开音乐播放,并弹出一个单独的WMP窗口进行播放。

The axWmp.openPlayer() is used to open music playback and will pop up a separate WMP window to play.

你可以试试:

 wmPlayer.URL=("x:\Music\Lindsey Buckingham\unknown\Never Going Back Again (axs).mp3")

最好的问候,

Alex


这篇关于有人可以帮助我在VB下运行Windows Media Player吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆