如何使用c#.net在全屏模式下打开任何视频文件? [英] How to open any video file on full screen mode using c# .net?

查看:71
本文介绍了如何使用c#.net在全屏模式下打开任何视频文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



如何使用c#.net在全屏模式下打开任何视频文件?



我正在使用此代码播放视频但我的视频没有以全屏模式启动。



Hello,

How to open any video file on full screen mode using c# .net?

I am using this code for play video but my video is not starting on full screen mode.

private void button1_Click(object sender, EventArgs e)
        {
            
            Process.Start(@"c:\\abc.avi"); 
        }





我们如何在默认情况下以全屏模式打开。

请帮帮我。





在此先感谢。



Ankit Agarwal
软件工程师



How can we open in full screen mode by default.
Please help me.


Thanks in Advance.

Ankit Agarwal
Software Engineer

推荐答案

由于您使用的是 Process 类,此代码将运行用户已与AVI文件关联的媒体播放器程序。媒体播放器将有不同的标志以全屏模式启动,这是您需要使用的东西。



但是您可以使用<$ c $打开最大化窗口c> Process.StartInfo.WindowStyle 属性。这与全屏不同。



除非您运行特定的媒体播放器来播放文件,否则您可以在这里做的很少。您在评论中提到了Windows Media Player,但无法保证此代码是否会运行它。如果用户在系统上有VLC播放器且与AVI文件扩展名相关联,则您的代码将运行VLC播放器,而不是WMP。
Since you are using Process class, this code will run the the media player program that user has associated with AVI files. Media players will have different flags to start in fullscreen mode and that is something you will need to live with.

You can however open the maximized window using Process.StartInfo.WindowStyle property. This is not same as full screen though.

Unless you run a specific media player to play the files, there is very little you could do here. You did mentioned Windows Media Player in the comment but there is no guarantee if this code will run it. If user has, say, VLC player on the system and it is associated with AVI file extension, your code will run VLC player and not WMP.


这篇关于如何使用c#.net在全屏模式下打开任何视频文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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