GetScreenWidth
Width = GetScreenWidth()
 
Parameters: NONE
Returns:

    Width = The width (in pixels) of the graphics area of the screen
 

      GetScreenWidth() returns the current width in pixels of the display area of the screen.



FACTS:


      * When in windowed mode, the returned width will not include the windows boarders, just the pixel area.



Mini Tutorial:


      Display the current width/height/depth and type of the screen currently in use.

  
  Print "The Screens Current Settings are."
  Print "Current Display Width:"+Str$(GetScreenWidth())
  Print "Current Display Height:"+Str$(GetScreenHeight())
  Print "Current Display Depth:"+Str$(GetScreenDepth())
  Print "Current Display Type:"+Str$(GetScreenType())
  
; Display the Screen and waitkey for key press before ending.
  Sync
  WaitKey
  



      Since PlayBASIC default screen settings are 800,600,16,1 the above code will output.


  
  Current Display Width:800
  Current Display Height:600
  Current Display Depth:16
  Current Display Type:1
  


Note: Since it's running windowed mode, it might not have a screen depth of 16.


 
Related Info: GetScreenDepth | GetScreenHeight | GetScreenType | GetSurfaceHeight | GetSurfaceWidth | OpenScreen :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com