Show Full Screen Mode
Show Full Screen Mode in C#
Details: Show Full Screen Mode
In this tutorial, we will illustrate how to create a program using C# programming language that can view the full screen of an interface.
1 – We start by creating a Windows Form Application using Microsoft Visual Studio 2019 following the steps;
– Navigate to File
– Click on New Project
– Select Window Application
2 – Proceed to insert a Button labelled Button1 and display it as “Show FullScreen”.
Your interface should look like the image below.
3 – Use the code below in the button1 as displayed in show fullscreen button.
private void Button1_Click(System.Object sender, System.EventArgs e)
{
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.TopMost = true;
}
Observe that the keyword here refers to our current structure. We get the style property of our border into none, significance there is no title bar in the form. The window’s state is set to expand to set the form in its full screen form without having a title bar. The top property of the form is set to true so that it will overlap all the forms inside the project.
Outputs: Show Full Screen Mode
Recommended Tutorial: Validating Phone Number in C# FREE