ScreenExtensionsGetScreenHandle Method
Gets a handle to the source
Screen.
You can use the returned handle in subsequent GDI functions.
Namespace: DevCase.Extensions.ScreenExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static IntPtr GetScreenHandle(
this Screen sender
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function GetScreenHandle (
sender As Screen
) As IntPtr
Dim sender As Screen
Dim returnValue As IntPtr
returnValue = sender.GetScreenHandle()
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static IntPtr GetScreenHandle(
Screen^ sender
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member GetScreenHandle :
sender : Screen -> IntPtr
No code example is currently available or this language may not be supported.
- sender Screen
-
The source Screen.
IntPtr
The resulting
IntPtr.
In Visual Basic and C#, you can call this method as an instance method on any object of type
Screen. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This is a code example.
No code example is currently available or this language may not be supported.
Dim scr As Screen = Screen.PrimaryScreen
Dim hMonitor As IntPtr = scr.GetScreenHandle()
' Get a device context.
Dim hdc As IntPtr = NativeMethods.GetDC(hMonitor)
' Release the device context.
NativeMethods.ReleaseDC(IntPtr.Zero, hdc)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.