ScreenExtensionsCreateDeviceContext Method

Creates a device context (DC) for the source Screen and returns a IntPtr pointing to the created device context.

The device context is an opaque data structure, whose values are used internally by GDI. You can use the returned IntPtr in subsequent GDI functions to draw in the device context.

The device context must be released by calling the the ReleaseDC(IntPtr, IntPtr) function.

Definition

Namespace: DevCase.Extensions.ScreenExtensions
Assembly: 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 CreateDeviceContext(
	this Screen sender
)

Parameters

sender  Screen
The source Screen.

Return Value

IntPtr
A IntPtr pointing to the created device context.

Usage Note

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).

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also