Truly Fullscreen

This is a discussion on Truly Fullscreen within the C# Programming forums, part of the General Programming Boards category; How can I make a Winform go truly full screen? I currently have it set by using this way: Code: ...

  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    4

    Truly Fullscreen

    How can I make a Winform go truly full screen? I currently have it set by using this way:

    Code:
                this.Bounds = Screen.PrimaryScreen.Bounds;
                this.TopMost = true;
    That just makes the window maximized. Is there any way to make an application go into full screen like more games do?

  2. #2
    Registered User valaris's Avatar
    Join Date
    Jun 2008
    Location
    RING 0
    Posts
    507
    try adding:
    this.FormBorderStyle = FormBorderStyle.None;
    this.Owner = null;


    Probably would want to add a key combo though to reassign it to a normal window.

    Also perhaps this isn't the most elegant or friendly way to do it.
    Last edited by valaris; 10-23-2008 at 09:46 PM.

  3. #3
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    This should do it:
    Code:
    targetForm.WindowState = FormWindowState.Maximized;
    targetForm.FormBorderStyle = FormBorderStyle.None;
    targetForm.TopMost = true;
    If the above doesn't work for you you can read this for other minor fixes: http://www.vesic.org/english/blog/wi...reen-maximize/

  4. #4
    Registered User
    Join Date
    Oct 2008
    Posts
    4
    thanks a lot.

  5. #5
    Registered User
    Join Date
    Oct 2008
    Posts
    4

    Solution

    I got it working. Heres how...

    Code:
        //Maximize the program
                this.WindowState = FormWindowState.Maximized;
                this.FormBorderStyle = FormBorderStyle.None;
                this.TopMost = true;
    Code:
    //Code to exit out of full screen
            private void simpleOpenGlControl1_KeyDown(object sender, KeyEventArgs e)
            {
                if (e.KeyCode == Keys.Escape)
                {
                    Close();
                }
            }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 10:06 AM
  2. This is how to get your program to run fullscreen (console)
    By Raigne in forum Windows Programming
    Replies: 11
    Last Post: 11-25-2005, 07:26 AM
  3. problem with open gl engine.
    By gell10 in forum Game Programming
    Replies: 1
    Last Post: 08-21-2003, 04:10 AM
  4. cursor remains in openGL fullscreen
    By Ken Fitlike in forum Game Programming
    Replies: 5
    Last Post: 03-14-2002, 07:52 PM
  5. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 09:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21