ExtensionMethods.AcquireWin32Focus Method

Puts the Win32 focus to the HWND of the HwndSource of the DependencyObject provided. If a new HWND other than currently focused one is focused then it returns true, setting the previousFocus parameter to the previously focused HWND and it returns false otherwise.

Namespace:  Microsoft.VisualStudio.PlatformUI
Assembly:  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)

Syntax

声明
<ExtensionAttribute> _
Public Shared Function AcquireWin32Focus ( _
    obj As DependencyObject, _
    <OutAttribute> ByRef previousFocus As IntPtr _
) As Boolean
用法
Dim obj As DependencyObject
Dim previousFocus As IntPtr
Dim returnValue As Boolean

returnValue = obj.AcquireWin32Focus(previousFocus)
public static bool AcquireWin32Focus(
    this DependencyObject obj,
    out IntPtr previousFocus
)
[ExtensionAttribute]
public:
static bool AcquireWin32Focus(
    DependencyObject^ obj, 
    [OutAttribute] IntPtr% previousFocus
)
static member AcquireWin32Focus : 
        obj:DependencyObject * 
        previousFocus:IntPtr byref -> bool 
public static function AcquireWin32Focus(
    obj : DependencyObject, 
    previousFocus : IntPtr
) : boolean

Parameters

Return Value

Type: System.Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DependencyObject. 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).

.NET Framework Security

See Also

Reference

ExtensionMethods Class

ExtensionMethods Members

Microsoft.VisualStudio.PlatformUI Namespace