首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >WMP -源对象不提供IPropertyNotifySink

WMP -源对象不提供IPropertyNotifySink
EN

Stack Overflow用户
提问于 2017-09-13 02:22:07
回答 1查看 335关注 0票数 0

根据下面的说明,我已经包含了一个对WMP的引用:https://msdn.microsoft.com/de-de/library/windows/desktop/dd564585(v=vs.85).aspx

窗体设计器的代码如下所示:

代码语言:javascript
复制
    <System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
    Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMP))
    Me.wmp1 = New AxWMPLib.AxWindowsMediaPlayer()
    CType(Me.wmp1, System.ComponentModel.ISupportInitialize).BeginInit()
    Me.SuspendLayout()
    '
    'wmp1
    '
    Me.wmp1.Enabled = True
    Me.wmp1.Location = New System.Drawing.Point(67, 51)
    Me.wmp1.Name = "wmp1"
    Me.wmp1.OcxState = CType(resources.GetObject("wmp1.OcxState"), System.Windows.Forms.AxHost.State)
    Me.wmp1.Size = New System.Drawing.Size(75, 23)
    Me.wmp1.TabIndex = 0
    '
    'frmMP
    '
    Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
    Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
    Me.ClientSize = New System.Drawing.Size(284, 261)
    Me.Controls.Add(Me.wmp1)
    Me.Name = "frmMP"
    Me.Text = "frmMP"
    CType(Me.wmp1, System.ComponentModel.ISupportInitialize).EndInit()
    Me.ResumeLayout(False)

End Sub

我现在收到错误消息"System.ArgumentException:源对象没有提供IPropertyNotifySink事件接口“。在队伍中

代码语言:javascript
复制
CType(Me.wmp1, System.ComponentModel.ISupportInitialize).EndInit()

我不知道我应该在这里做什么。有人能帮上忙吗?

EN

回答 1

Stack Overflow用户

发布于 2017-09-13 16:43:10

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46183120

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档