DESKTOPWIDTH: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 13: Line 13:


{{PageAvailability}}
{{PageAvailability}}
* '''QB64 1.0 and up''' (QB64 Team)
* '''QB64 v1.0 and up'''
* '''QBPE 0.5 and up''' (QB64 Phoenix Edition)
* '''QB64-PE all versions'''




{{PageExamples}}
{{PageExamples}}
{{CodeStart}}
{{CodeStart}}
 
s& = {{Cl|_NEWIMAGE}}({{Text|800|#F580B1}}, {{Text|600|#F580B1}}, {{Text|256|#F580B1}})
s& = {{Cl|_NEWIMAGE}}(800, 600, 256)
{{Cl|SCREEN}} s&
SCREEN s&
{{Cl|PRINT}} {{Cl|_DESKTOPWIDTH}}, {{Cl|_DESKTOPHEIGHT}}
PRINT _DESKTOPWIDTH, _DESKTOPHEIGHT
{{Cl|PRINT}} {{Cl|_WIDTH (function)|_WIDTH}}, {{Cl|_HEIGHT}}
PRINT _WIDTH, _HEIGHT
 
{{CodeEnd}}
{{CodeEnd}}


Line 33: Line 31:
* [[_HEIGHT]], [[_DESKTOPHEIGHT]]
* [[_HEIGHT]], [[_DESKTOPHEIGHT]]
* [[_WIDTH]], [[_SCREENIMAGE]]
* [[_WIDTH]], [[_SCREENIMAGE]]




{{PageNavigation}}
{{PageNavigation}}

Latest revision as of 19:38, 23 March 2023

The _DESKTOPWIDTH function returns the width of the users current desktop.


Syntax

x& = _DESKTOPWIDTH


Description

  • No parameters are needed for this function.
  • This returns the width of the user's desktop, not the size of any screen or window which might be open on that desktop.


Availability

  • QB64 v1.0 and up
  • QB64-PE all versions


Examples

s& = _NEWIMAGE(800, 600, 256)
SCREEN s&
PRINT _DESKTOPWIDTH, _DESKTOPHEIGHT
PRINT _WIDTH, _HEIGHT
Explanation: This will print the size of the user desktop (for example 1920, 1080 for a standard hdmi monitor), and then the size of the current screen (800, 600).


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link