Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: OuTLawZGoSu on August 16, 2003, 07:33 PM

Title: Full Screen help...
Post by: OuTLawZGoSu on August 16, 2003, 07:33 PM
How can i make a form go on full screen?
Title: Re:Full Screen help...
Post by: BoBBaGe on August 16, 2003, 09:19 PM
on the form, make the borderstyle 0 - None
then on the form, make the windowstate 2 - Maximized

that will bring you to a complete full screen

or you could have the borderstyle 0 - None
and on Form_Load() have  Form1.WindowState = 2
Title: Re:Full Screen help...
Post by: Camel on August 17, 2003, 12:36 AM
Eh, that's not really fullscreen, that's more "taking up the entire screen assuming all of the other applications want to play fair."
Title: Re:Full Screen help...
Post by: drivehappy on August 17, 2003, 01:03 AM
Well if you put it that way, I guess the only way would be to use DirectX :).
Title: Re:Full Screen help...
Post by: Adron on August 17, 2003, 05:03 AM
Making a window cover the entire screen is the way you normally do fullscreen. MSN sometimes pops up over fullscreen games - if applications don't want to play fair, they'll probably find a way to put themselves on top.
Title: Re:Full Screen help...
Post by: j0k3r on August 17, 2003, 06:14 AM
There's a command or window property or something that makes it so you can't click off the form, and nothing is on top of the form... I just don't remember the command sorry maybe someone who knows more will know.
Title: Re:Full Screen help...
Post by: Adron on August 17, 2003, 11:06 AM
Are you thinking of WS_EX_TOPMOST?
Title: Re:Full Screen help...
Post by: j0k3r on August 17, 2003, 11:28 AM
That doesn't seem right, I think it was an actual property of the window... Forgot it though.
Title: Re:Full Screen help...
Post by: EvilCheese on August 17, 2003, 12:01 PM
It would be helpful to know what you're trying to achieve (is this to be a full-screen game, or a nag-screen, or what?)

If it's for a game, then this is the code my D3DCore class uses for setting fullscreen... I'm not sure how it would look in VB, but it might help you:


   if(fullscreen && m_bWindowed)
   {
      //First adjust window style to remove title bars etc.
      SetWindowLong(m_hWnd, GWL_STYLE, WS_POPUP|WS_SYSMENU|WS_VISIBLE);

      //First try a simple adapter reset
      D3DDISPLAYMODE adaptermode;

      if(m_pD3D != NULL)
      {
         if( FAILED(m_pD3D->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &adaptermode)) )
            return ERR_COREFAILURE;
      
         m_d3dpp.Windowed = false;
         m_d3dpp.BackBufferHeight = adaptermode.Height;
         m_d3dpp.BackBufferWidth = adaptermode.Width;
         m_d3dpp.FullScreen_RefreshRateInHz = adaptermode.RefreshRate;
         

         if( ! FAILED(m_pDevice->Reset(&m_d3dpp)) )
         {
            SetWindowPos(m_hWnd, HWND_TOP, 0, 0, adaptermode.Width, adaptermode.Height, 0);
            m_bWindowed = false;
            Pause(false);
            return 1;
         }
         else return ERR_DEVICENOTRESET;
      
      }
      else return ERR_COREFAILURE;
      
   }


Title: Re:Full Screen help...
Post by: DarkMinion on August 17, 2003, 06:37 PM
I know you just did not post MFC code on this forum.  >:(
Title: Re:Full Screen help...
Post by: EvilCheese on August 17, 2003, 07:31 PM
You're correct.... I didnt :P
Title: Re:Full Screen help...
Post by: OuTLawZGoSu on August 17, 2003, 07:34 PM
thx for all ye rhelp... i was looking for a fullscreen on a regular form.
i got it now....
Title: Re:Full Screen help...
Post by: EvilCheese on August 17, 2003, 07:39 PM
No worries.

Once thing I'm curious about though..... DM, what made you think that was MFC code?

It's actually the D3D9 API, but I'm interested to know how you drew that conclusion.
Title: Re:Full Screen help...
Post by: DarkMinion on August 17, 2003, 08:07 PM
Quotem_

I always get suspicious of possible MFC infections when I see that.