Screen & System Metrics
Updated Monday December 26, 2011
   
Category
Topic
Display
vb6
vb5
vb4-32
SendMessage: Change the Display Power State
Turn power saving-enabled monitors off/on. Mar 28.2004

SystemParametersInfo: Determine Available Screen Real Estate
Using SystemParametersInfo to return the co-ordinates of the screen not covered by taskbars.

SHAppBarMessage: Determine TaskBar Position
How to determine the current screen docking position(s) of taskbars, and their state (on-top, hidden etc.).

GetSystemMetrics: Determine Windows Start-up Mode
API to determine if Windows is currently running in Normal Mode, Safe Mode, or Safe Mode with Network Support. Feb 16.1998

keybd_event: Manipulating the Desktop
Launch Explorer, Find Files, and the Run Dialog, open the Start Menu, Minimize all windows, and launch Windows Help, all using three lines of code and the keybd_event API. Oct 27.1998



Multiple Displays
vb6
vb5
vb4-32
DesktopsSameColourFormat
Tests if monitors in a multi-monitor setup are using the same display colour format. Dec 30.2002

EnumDisplayMonitors: Enumerating System Monitor Info
EnumDisplayDevices obtains monitor details in single or multi-monitor setups based on the monitor handle. Dec 30.2002

GetDesktopMaximumHeight
Returns the total desktop height of all monitors. Dec 30.2002

GetDesktopMaximumWidth
Returns the total desktop width of all monitors. Dec 30.2002

GetMonitorByPoint
Pass a screen point, returns the monitor that point (or part thereof) is on. Dec 30.2002

GetMontitorByRect
Pass a RECT, returns the monitor that rect (or part thereof) is on. Dec 30.2002

GetMonitorByWindow
Pass a window handle and RECT, returns the monitor that window (or part thereof) is on. Dec 30.2002

GetMonitorCount
Shows how to determine the number monitors. Dec 30.2002

EnumDisplayMonitors: Enumerating System Monitor Info
EnumDisplayDevices obtains monitor details in single or multi-monitor setups based on the monitor handle. Dec 30.2002



Screen Metrics
vb6
vb5
vb4-32

 

DesktopsSameColourFormat
Tests if monitors in a multi-monitor setup are using the same display colour format. Dec 30.2002

SystemParametersInfo: Determine Available Screen Real Estate
Using SystemParametersInfo to return the co-ordinates of the screen not covered by taskbars.

GetSystemMetrics: Determine Windows Start-up Mode
API to determine if Windows is currently running in Normal Mode, Safe Mode, or Safe Mode with Network Support. Feb 16.1998



Fonts
vb6
vb5
vb4-32
GetDeviceCaps: Determine the Current System Screen Font
A small API routine to determine which system font (Small or Large) installed on the target system.


keybd_event
vb6
vb5
vb4-32
keybd_event: Manipulating the Desktop 
Launch Explorer, Find Files, and the Run Dialog, open the Start Menu, Minimize all windows, and launch Windows Help, all using three lines of code and the keybd_event API. Oct 27.1998

keybd_event: Navigate Form Controls using Enter
Replace SendKeys to move through controls using Enter. Jan 1.2003



Modes
vb6
vb5
vb4-32
ChangeDisplaySettings: Change Display Resolution
Use this routine to change the current screen resolution or depth. Sep 1.1998  vb6, vb5 only

EnumDisplaySettings: Enumerate Available Display Resolutions
Method to determine which resolutions a system supports. Modified from original code to support multiple-frequencies returned by NT4. Jun 4.1999

GetDeviceCaps: Display Resolution, Refresh Rate and Colour Depth
Code to obtain the myriad of GetDeviceCaps settings for displays April 18.1999



PrintScreen
vb6
vb5
vb4-32
keybd_event: Activating CapsLock, NumLock, ScrollLock and PrintScreen (NT or later)
Changing the keyboard state using the keybd_event API on Windows NT/Windows 2000. Aug 25.1999

keybd_event: Calling Windows' PrintScreen Function
The call to capture the screen to the clipboard.

InflateRect: Highlighting External Windows
How to use DrawFocusRect and InflateRect to highlight main and child windows anywhere on the screen, and capture the window to a picture box (print screen). Oct 25.2004

OleCreatePictureIndirect: Mimicking PrintScreen Using OLE
How to use the OLE interface to generate a PrintScreen routine.

BitBlt: Mimicking the PrintScreen Function
How to implement the BitBlt API to mimic a PrintScreen routine.

CreateEnhMetaFile: Saving a PrintScreen as a Windows Enhanced Metafile
Using CreateEnhMetaFile and PlayEnhMetaFile to capture and save a window client area to a metafile. Feb 5.2003

BitBlt: Mimicking PrintScreen to Create a 'PrintForm'
Extending the above code to add Print Form and Print Any Window capabilities.



System Metrics
vb6
vb5
vb4-32
SystemParametersInfo: Non-Client Window Font Info
Get the font data for popular Display Properties / Appearance members.  Dec 7.1999

 



 

 
 

PayPal Link
Make payments with PayPal - it's fast, free and secure!

 
 
 
 

Copyright ©1996-2011 VBnet and Randy Birch. All Rights Reserved.
Terms of Use  |  Your Privacy

 

Hit Counter