简体   繁体   English

如何使用C#使用Process.Start()全屏打开视频文件?

[英]How to open video file in full screen with Process.Start() using C#?

I would like to know how to open a video file in FULL SCREEN using Process.Start(). 我想知道如何使用Process.Start()在FULL SCREEN中打开视频文件。

The code I currently have opens the (only) file in my directory in maximized mode, which does not hide the windows 10 task bar. 我当前拥有的代码以最大化模式打开目录中的(唯一)文件,该文件不会隐藏Windows 10任务栏。 How to open video file in full screen with Process.Start()? 如何使用Process.Start()全屏打开视频文件?

   static void Main(string[] args)
    {
        foreach (var path_to_object in Directory.GetFiles(@"D:\"))
        {
            ProcessStartInfo file_object = ProcessStartInfo(path_to_object);
            file_object.WindowStyle = ProcessWindowStyle.Maximized;
            Process.Start(file_object);
        }
    }

Your code will launch whatever video player the user has associated with the video extension. 您的代码将启动用户与视频扩展名关联的任何视频播放器。 So, open it in full screen would be probably a different parameter depending on the player used. 因此,根据所使用的播放器,全屏打开它可能是一个不同的参数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM