Raoul Duke
Raoul Duke

Reputation: 165

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().

The code I currently have opens the (only) file in my directory in maximized mode, which does not hide the windows 10 task bar. How to open video file in full screen with 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);
        }
    }

Upvotes: 0

Views: 1258

Answers (1)

Oscar
Oscar

Reputation: 13970

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.

Upvotes: 1

Related Questions