Restored from previous forum. Originally posted by Cantor.
Hi!
How can I get the resolution results of the system (Windows Desktop) screen?
It is necessary as I want to open an application window that has the sizes of the Windows Desktop.
--
Best regards,
Martin
Getting Windows-Window Resolution
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by PB.
GetSystemMetrics_(#SM_CXSCREEN) ; Gives the width (in pixels) of the Desktop.
GetSystemMetrics_(#SM_CYSCREEN) ; Gives the height (in pixels) of the Desktop.
Thus, to open a full-screen window:
Edited by - PB on 04 November 2001 21:35:19
GetSystemMetrics_(#SM_CXSCREEN) ; Gives the width (in pixels) of the Desktop.
GetSystemMetrics_(#SM_CYSCREEN) ; Gives the height (in pixels) of the Desktop.
Thus, to open a full-screen window:
Code: Select all
If OpenWindow(0,0,0,GetSystemMetrics_(#SM_CXSCREEN),GetSystemMetrics_(#SM_CYSCREEN),#PB_Window_SystemMenu|#PB_Window_MinimizeGadget,"Title")
Repeat
ev=WaitWindowEvent()
Until ev=#PB_EventCloseWindow
EndIf
Edited by - PB on 04 November 2001 21:35:19
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Cantor.
Do You also know how I can get the height of the taskbar at the bottom of the desktop? I want to open a maximized window but the taskbar should be visible.
--
Best regards,
Martin
Many thanks for Your help. That's what I've searched for.GetSystemMetrics_(#SM_CXSCREEN) ; Gives the width (in pixels) of the Desktop.
GetSystemMetrics_(#SM_CYSCREEN) ; Gives the height (in pixels) of the Desktop.
Do You also know how I can get the height of the taskbar at the bottom of the desktop? I want to open a maximized window but the taskbar should be visible.
--
Best regards,
Martin
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by PB.
Edited by - PB on 05 November 2001 01:29:52
I don't know how to get the Taskbar height, but one thing you should be aware of is that the Taskbar can be on any edge of the screen -- not just the bottom. So it's probably better just to open your window and then maximize it with this code: ShowWindow_(WindowID(),#SW_MAXIMIZE)Do You also know how I can get the height of the taskbar at the bottom of the desktop? I want to open a maximized window but the taskbar should be visible.
Edited by - PB on 05 November 2001 01:29:52
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm