Windows媒体播放器问题 [英] Windows media player issue

查看:143
本文介绍了Windows媒体播放器问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的项目中使用Windows媒体播放器,如果我从我的主要形式调用媒体播放器播放,我已经编写了代码,当我点击Wmp时它转到主窗体但是当我这样做时它显示尝试读取或写入受保护的内存。这通常表示其他内存已损坏。任何人都可以为此提供解决方案,在此先感谢。







主要代码:



Frmads frm = new frmads(this);

Frm.show();

This.hide(); < br $>


广告表格代码:



如果(e.newstate = = 2)

$

Frmmain.Activate();

Frmmain.show();

This.close();

}



我尝试了什么:



请给很快解决这个问题。在此先感谢

解决方案

不要这样做。

相反,处理Frmads.FormClosing事件,并在处理程序中重新 - 显示你的主要表格。



孩子表格甚至不应该知道父母甚至存在,更不用说隐藏它并需要重新显示。 / BLOCKQUOTE>

Hi, I am using Windows media player in my project, if I call media player from my main form its playing, I have written code that when I click Wmp it goes to main form but when I do this it is showing "Attempted to read or write protected memory. This is often an indication that other memory is Corrupt". Can anyone provide solution for this, Thanks in advance .



Mainform code:

Frmads frm=new frmads(this);
Frm.show();
This.hide();

Ads Form code:

If(e.newstate = =2)
{
Frmmain.Activate();
Frmmain.show();
This.close();
}

What I have tried:

Please give a solution of this issue soon. Thanks in advance

解决方案

Don't do it that way.
Instead, handle the Frmads.FormClosing event, and in the handler re-display your main form.

The "child" form should not even know that the "parent" even exists, much less that it is hidden and needs redisplaying.


这篇关于Windows媒体播放器问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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