Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Full screen

Full screen

Scheduled Pinned Locked Moved C#
csharpcomquestion
10 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    Yoyosh 0
    wrote on last edited by
    #1

    I read the article http://www.codeproject.com/csharp/fullscreenmode.asp[^] but this is nasty way to do that. Maybe C# 2.0 has already FullScreen property in some class for I could use it?

    N S 2 Replies Last reply
    0
    • Y Yoyosh 0

      I read the article http://www.codeproject.com/csharp/fullscreenmode.asp[^] but this is nasty way to do that. Maybe C# 2.0 has already FullScreen property in some class for I could use it?

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      You can set the WindowState property to Maximized. Or do you want the black backgound with your app in the center?

      Y 1 Reply Last reply
      0
      • Y Yoyosh 0

        I read the article http://www.codeproject.com/csharp/fullscreenmode.asp[^] but this is nasty way to do that. Maybe C# 2.0 has already FullScreen property in some class for I could use it?

        S Offline
        S Offline
        Sean89
        wrote on last edited by
        #3

        This works for full screen mode for me:

        private void Form1_Load(object sender, System.Windows.Forms.KeyEventArgs e)
        {
        this.Bounds = Screen.AllScreens[0].Bounds;
        this.TopMost = true;
        }

        Does that help?

        Y 1 Reply Last reply
        0
        • N Not Active

          You can set the WindowState property to Maximized. Or do you want the black backgound with your app in the center?

          Y Offline
          Y Offline
          Yoyosh 0
          wrote on last edited by
          #4

          Full screen and maximized window are 2 different things, the solution below is correct.

          N 1 Reply Last reply
          0
          • S Sean89

            This works for full screen mode for me:

            private void Form1_Load(object sender, System.Windows.Forms.KeyEventArgs e)
            {
            this.Bounds = Screen.AllScreens[0].Bounds;
            this.TopMost = true;
            }

            Does that help?

            Y Offline
            Y Offline
            Yoyosh 0
            wrote on last edited by
            #5

            Yes, exactly, thank you :) Do you maybe know how to get rid of window bounds and the upper strip with name of the form and min, max and close buttons?

            S 1 Reply Last reply
            0
            • Y Yoyosh 0

              Full screen and maximized window are 2 different things, the solution below is correct.

              N Offline
              N Offline
              Not Active
              wrote on last edited by
              #6

              Perhaps I'm missing something :confused: I'm always looking to fill in the gaps in my knowledge. Both of these seem to produce the same results. WindowState = FormWindowState.Maximized; TopMost = true; Bounds = Screen.AllScreens[0].Bounds; TopMost = true;

              Y 1 Reply Last reply
              0
              • Y Yoyosh 0

                Yes, exactly, thank you :) Do you maybe know how to get rid of window bounds and the upper strip with name of the form and min, max and close buttons?

                S Offline
                S Offline
                Sean89
                wrote on last edited by
                #7

                Set the FormBorderStyle property of your form to "None". That should do it :laugh:

                Y 1 Reply Last reply
                0
                • N Not Active

                  Perhaps I'm missing something :confused: I'm always looking to fill in the gaps in my knowledge. Both of these seem to produce the same results. WindowState = FormWindowState.Maximized; TopMost = true; Bounds = Screen.AllScreens[0].Bounds; TopMost = true;

                  Y Offline
                  Y Offline
                  Yoyosh 0
                  wrote on last edited by
                  #8

                  First of all, u didnt said that I should used the line: TopMost = true; Second of all, the solution produced by that guy isn`t correct in 100% too. Maximization is an effect that u can achive by clicking appriopriate button on the top your window. Fullscreen gives ur application full screen, so no borders around, no start button, no the upper strip. U got every pixel on the screen up to u. Many computer games offer full screen, while many windows applications (form oriented) offers just a maximization. cheers

                  N 1 Reply Last reply
                  0
                  • S Sean89

                    Set the FormBorderStyle property of your form to "None". That should do it :laugh:

                    Y Offline
                    Y Offline
                    Yoyosh 0
                    wrote on last edited by
                    #9

                    oh yee it does ;) thanx again

                    1 Reply Last reply
                    0
                    • Y Yoyosh 0

                      First of all, u didnt said that I should used the line: TopMost = true; Second of all, the solution produced by that guy isn`t correct in 100% too. Maximization is an effect that u can achive by clicking appriopriate button on the top your window. Fullscreen gives ur application full screen, so no borders around, no start button, no the upper strip. U got every pixel on the screen up to u. Many computer games offer full screen, while many windows applications (form oriented) offers just a maximization. cheers

                      N Offline
                      N Offline
                      Not Active
                      wrote on last edited by
                      #10

                      -Yoyosh- wrote:

                      First of all, u didnt said that I should used the line: TopMost = true;

                      Nor did you ask for TopMost.

                      -Yoyosh- wrote:

                      Maybe C# 2.0 has already FullScreen property in some class for I could use it?

                      You also didn't specify that you wanted no borders. We'll just say it was miscommunication and move on.:)

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups