Access/VBA Library

GetDC

Retrieves a handle to a device context (DC) for the client area of a specified window or for the entire screen.

See also: https://msdn.microsoft.com/en-us/library/windows/desktop/dd144871(v=vs.85).aspx

Syntax

GetDC( hwnd )
Parameters
Name Type Description
hwnd Long Required. A handle to the window whose DC is to be retrieved.
Return value

Long : A handle to the DC for the specified window's client area.

Code
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long

Remarks

  • API is used to determine the width and height of the screen.

See also

  • ScreenWidth
  • ScreenHeight