IOleInPlaceSiteWindowless.SetFocus Method
Sets the keyboard focus for a UI-active, windowless object.
Namespace: Microsoft.VisualStudio.OLE.Interop
Assembly: Microsoft.VisualStudio.OLE.Interop (in Microsoft.VisualStudio.OLE.Interop.dll)
Syntax
'宣言
Function SetFocus ( _
fFocus As Integer _
) As Integer
'使用
Dim instance As IOleInPlaceSiteWindowless
Dim fFocus As Integer
Dim returnValue As Integer
returnValue = instance.SetFocus(fFocus)
int SetFocus(
int fFocus
)
int SetFocus(
[InAttribute] int fFocus
)
abstract SetFocus :
fFocus:int -> int
function SetFocus(
fFocus : int
) : int
Parameters
- fFocus
Type: System.Int32
[in] If TRUE, sets the keyboard focus to the calling object. If FALSE, removes the keyboard focus from the calling object, provided that the object has the focus.
Return Value
Type: System.Int32
S_OK
Keyboard focus was successfully given to the object. If this method is called to release the focus, it should never fail.
S_FALSE
Keyboard focus was denied to the object.
Remarks
For information on the COM interface, see IOleInPlaceSiteWindowless::SetFocus
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
IOleInPlaceSiteWindowless Interface