mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-07 07:56:07 +02:00
Initial winforms content migrated (#18)
* Merge winforms framework content to working branch (#14) * Breadcrumb / TOC / Move net5 to net folder (#15) * change path from net5 to net * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Add .net 5 winforms placeholder article (#16) * added some metadata and adjusted net5 placeholder * corrections * corrections * corrections * Test1 * Swapping landing page vs concept * fix links * Fix links * Fix desc
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
---
|
||||
title: "Mouse Capture"
|
||||
ms.date: "03/30/2017"
|
||||
helpviewer_keywords:
|
||||
- "mouse [Windows Forms], capture"
|
||||
ms.assetid: 8911d4b0-a4f8-4f93-8246-371aebd27d0c
|
||||
---
|
||||
# Mouse Capture in Windows Forms
|
||||
*Mouse capture* refers to when a control takes command of all mouse input. When a control has captured the mouse, it receives mouse input whether or not the pointer is within its borders.
|
||||
|
||||
## Setting Mouse Capture
|
||||
In Windows Forms the mouse is captured by the control when the user presses a mouse button on a control, and the mouse is released by the control when the user releases the mouse button.
|
||||
|
||||
The <xref:System.Windows.Forms.Control.Capture%2A> property of the <xref:System.Windows.Forms.Control> class specifies whether a control has captured the mouse. To determine when a control loses mouse capture, handle the <xref:System.Windows.Forms.Control.MouseCaptureChanged> event.
|
||||
|
||||
Only the foreground window can capture the mouse. When a background window attempts to capture the mouse, the window receives messages only for mouse events that occur when the mouse pointer is within the visible portion of the window. Also, even if the foreground window has captured the mouse, the user can still click another window, bringing it to the foreground. When the mouse is captured, shortcut keys do not work.
|
||||
|
||||
## See also
|
||||
|
||||
- [Mouse Input in a Windows Forms Application](mouse-input-in-a-windows-forms-application.md)
|
||||
Reference in New Issue
Block a user