InputKeyboardSource.GetForWindowId(WindowId) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves an InputKeyboardSource object for the specified top-level window.
public:
static InputKeyboardSource ^ GetForWindowId(WindowId windowId);
/// [Windows.Foundation.Metadata.Experimental]
static InputKeyboardSource GetForWindowId(WindowId const& windowId);
[Windows.Foundation.Metadata.Experimental]
public static InputKeyboardSource GetForWindowId(WindowId windowId);
function getForWindowId(windowId)
Public Shared Function GetForWindowId (windowId As WindowId) As InputKeyboardSource
Parameters
- windowId
- WindowId
The window identifier.
Returns
An InputKeyboardSource object for the specified top-level window, or a new InputKeyboardSource if one doesn't exist.
If windowId is invalid, is owned by a different thread than the calling thread, or is a child window, GetForWindowId returns null.
- Attributes
Remarks
GetForWindowId only supports top-level windows on the same thread as the caller.
Calling GetForWindowId multiple times will return the same object each time.
In all cases there can only be a single InputKeyboardSource associated with a particular Window ID.