UnderwareDESIGN

PlayBASIC => Beginners => Topic started by: Draco9898 on July 01, 2007, 01:50:22 AM

Title: Maximizing the playbasic window?
Post by: Draco9898 on July 01, 2007, 01:50:22 AM
Yes, I have no clue how to do this? I would think It's inside User32.dll, but I have no idea what command inside the dll to wrap for.
Title: Re: Maximizing the playbasic window?
Post by: kevin on July 01, 2007, 01:55:43 AM

Maximise screen in Windows mode (http://www.underwaredesign.com/forums/index.php?topic=1900.0)

Title: Re: Maximizing the playbasic window?
Post by: Draco9898 on July 01, 2007, 02:10:32 AM
thank you very much. Maybe it's asking too much, but Is there a way to make it always appear in front of the taskbar as well?
Title: Re: Maximizing the playbasic window?
Post by: kevin on July 01, 2007, 02:20:20 AM


See ->  Screen Styles (http://www.playbasic.com/sourcecodes.php?page=0&Order=1&Category=Screen&Author=All)
Title: Re: Maximizing the playbasic window?
Post by: Draco9898 on July 01, 2007, 02:34:50 AM
Oh whoops missed that, yes. This fixes all my graphics dramas inside full screen exclusive mode and gives users a choice between that and full/normal window.

Here we go:
[pbcode]
FUNCTION MaxWindow()
   `Get the cur win handle
   wHnd=GETSCREENHANDLE()
   IF wHND
      ThisDll=GETFREEDLL()
      LOADDLL "user32",ThisDll

      IF GETDLLSTATUS(ThisDll)
         ;  Call the ShowWindow Function with MAX
        `Set window to maximize
         SW_SHOWMAXIMIZED = 3      
         CALLDLL ThisDll,"ShowWindow", wHND, SW_SHOWMAXIMIZED
         `window varibles; Make window top, stationary AND max screen size
         HWND_TOPMOST = -1: SWP_NOMOVE = 2: SWP_NOSIZE = 1
         CALLDLL ThisDll,"SetWindowPos", wHND, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE

         DELETEDLL ThisDll
      ENDIF
   ENDIF
ENDFUNCTION
[/pbcode]

Yes, I feel like such a newbie, but is there a list of all functions inside user32 and their params?
Title: Re: Maximizing the playbasic window?
Post by: kevin on July 01, 2007, 02:54:14 AM
Yeah, it's called the Windows SDK :)
Title: Re: Maximizing the playbasic window?
Post by: Draco9898 on July 01, 2007, 04:54:25 AM
I see, I never have tinkered with the windows stuff, not that I really like to :P