Nevron .NET Vision
Nevron.UI.WinForm Namespace / NControlHelper Class / ControlContainsMouse Method
The control to examine.
If this flag is true the method will examine the control only if it is the direct one under the cursor.


In This Topic
    ControlContainsMouse Method
    In This Topic
    Determines whether a control contains the current mouse position within its region. The method gets the system region used to paint the specified control and checks whether it contains the cursor.
    Syntax
    'Declaration
     
    
    Public Shared Function ControlContainsMouse( _
       ByVal c As System.Windows.Forms.Control, _
       ByVal firstUnder As System.Boolean _
    ) As System.Boolean
    'Usage
     
    
    Dim c As System.Windows.Forms.Control
    Dim firstUnder As System.Boolean
    Dim value As System.Boolean
     
    value = NControlHelper.ControlContainsMouse(c, firstUnder)
    public static System.bool ControlContainsMouse( 
       System.Windows.Forms.Control c,
       System.bool firstUnder
    )

    Parameters

    c
    The control to examine.
    firstUnder
    If this flag is true the method will examine the control only if it is the direct one under the cursor.

    Return Value

    True if the control's region contains the cursor, false otherwise.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also