Windows媒体播放器 - Visual Studio c# [英] Windows media player - Visual studio c#

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

问题描述

我使用Windows Media Player控件在C#visual studio中创建了一个音乐播放器。它在我的计算机上工作正常 - 但是当我想将.exe发送给另一个人时,他们无法打开程序。

我在网上搜索并找不到任何解决方案,但有人说他们有同样的问题:



它不会在任何没有安装Visual Studio的电脑上运行......



我不知道为什么会这样,以及我如何解决它 - 任何人都可以提供任何解决方案:)

解决方案

可以在应用程序中嵌入Windows Media Player。参考: http://msdn.microsoft.com/ en-us / library / windows / desktop / dd562851%28v = vs.85%29.aspx [ ^ ]


看你因为你使用过这个问题你的项目中的AxInterop.WMPLib.dll和Interop.WMPLib.dll然后如果你在调试文件夹中使用.exe文件它不能与你合作,你有两个解决方案:

1-复制调试文件夹,然后从中运行程序。



2 - 使用visual studio 2010或visual studio 2012为您的项目创建一个安装文件。



注意:我是编程的初学者,仅仅是我编程的前6个月,我只用c#和大约45个c ++控制台应用程序编写了3个项目,但我遇到了同样的问题。第三个项目。 ^^

I have created a music player in C# visual studio using the Windows Media Player control. It works fine on my computer - but when I want to send the .exe to another person they cannot open the program.
I searched the web and can''t find any solutions but someone said they have the same problem:

It won''t run on any computer which doesn''t have visual studio installed...

I don''t know why this is, and how I fix it - can anyone offer any solutions? :)

解决方案

Nice reference is available to embed Windows Media Player in the application. Ref: http://msdn.microsoft.com/en-us/library/windows/desktop/dd562851%28v=vs.85%29.aspx[^]


look you face this problem because you used AxInterop.WMPLib.dll & Interop.WMPLib.dll in your project then if you used the .exe file out the Debug folder it won''t work with you ,you have two solution:
1-copy the debug folder then run the program from it.

2-make a setup file to your project with visual studio 2010 or visual studio 2012.

NOTE :I''m Beginner in programming it just my first 6 months to program and I wrote only 3 projects in c# and about 45 c++ console applications but i faced the same problem in my third project. ^ــ^


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

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