Daniel's XL Toolbox NG
Bovender.Win32Window Class Reference

Provides access to the window handle of a WPF window or a Form or a custom handle. More...

Inheritance diagram for Bovender.Win32Window:
Collaboration diagram for Bovender.Win32Window:

Public Member Functions

 Win32Window ()
 Creates a new instance whose handle must be provided by the MainWindowHandleProvider More...
 
 Win32Window (Forms.Form form)
 Creates a new instance whose handle is obtained from a Form. More...
 
 Win32Window (Window window)
 Creates a new instance whose handle is obtained from a WPF window. More...
 
 Win32Window (IntPtr handle)
 Creates a new instance that wraps a handle . More...
 

Properties

static Func< IntPtr > MainWindowHandleProvider [get, set]
 Gets or sets a function that provides the global window handle of the main window of an application. More...
 
IntPtr Handle [get]
 Gets the handle that is wrapped by this class. More...
 

Detailed Description

Provides access to the window handle of a WPF window or a Form or a custom handle.

Constructor & Destructor Documentation

◆ Win32Window() [1/4]

Bovender.Win32Window.Win32Window ( )
inline

Creates a new instance whose handle must be provided by the MainWindowHandleProvider

◆ Win32Window() [2/4]

Bovender.Win32Window.Win32Window ( Forms.Form  form)
inline

Creates a new instance whose handle is obtained from a Form.

◆ Win32Window() [3/4]

Bovender.Win32Window.Win32Window ( Window  window)
inline

Creates a new instance whose handle is obtained from a WPF window.

Parameters
window

◆ Win32Window() [4/4]

Bovender.Win32Window.Win32Window ( IntPtr  handle)
inline

Creates a new instance that wraps a handle .

Property Documentation

◆ Handle

IntPtr Bovender.Win32Window.Handle
get

Gets the handle that is wrapped by this class.

◆ MainWindowHandleProvider

Func<IntPtr> Bovender.Win32Window.MainWindowHandleProvider
staticgetset

Gets or sets a function that provides the global window handle of the main window of an application.

Window handles may change during the life time of an application. Excel for example will have one handle after startup, and a new main window handle when a workbook is opened.


The documentation for this class was generated from the following file: