• We just launched and are currently in beta. Join us as we build and grow the community.

Show Full Screen Mode in C#

2lifeiseasy2

Stablecoin Strategist
2 Rep
0
0
0
Rep
0
2 Vouches
0
0
0
Vouches
0
Posts
67
Likes
33
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 300 XP
Sometimes, because of exploring complicated codes we often forget the basics and the need of some functions. Take note that in C# there is no property such as show full screen, it is only maximizing the windowsstyle. In this tutorial, i will teach you how to create a program that can view full screen of your interface.

Now, let's start this tutorial!

1. Let's start with creating a Windows Form Application in C# for this tutorial by following the following steps in Microsoft Visual Studio 2010: Go to File, click New Project, and choose Windows Application.

2. Next, add only one Button named Button1 and labeled it as "Show FullScreen". You must design your interface like this:

fullscreendesign_1.png


3. In your button1 as show full screen button, put this code below.

  1. private

    void

    Button1_Click(

    System

    .

    Object

    sender, System

    .

    EventArgs

    e)
  2. {
  3. this

    .

    FormBorderStyle

    =

    System

    .

    Windows

    .

    Forms

    .

    FormBorderStyle

    .

    None

    ;
  4. this

    .

    WindowState

    =

    System

    .

    Windows

    .

    Forms

    .

    FormWindowState

    .

    Maximized

    ;
  5. this

    .

    TopMost

    =

    true

    ;
  6. }

Take note that the keyword this here refers to our current form. We get the style property of our border into none which means there is no title bar in the form. The windows state is set to maximize to set the form in its full screen form without having a title bar. TopMost property of the form is set to true which means it will overlap all the forms inside the project.

Output:
fullscreenoutput_0.png


For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below.

Best Regards,

Engr. Lyndon Bermoy
IT Instructor/System Developer/Android Developer/Freelance Programmer

If you have some queries, feel free to contact the number or e-mail below.
Mobile: 09488225971
Landline: 826-9296
E-mail:[email protected]

Add and Follow me on Facebook: https://www.facebook.com/donzzsky

Visit and like my page on Facebook at: https://www.facebook.com/BermzISware

 

442,401

317,942

317,951

Top