Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Enables an in-place active, windowless object to capture all mouse messages.
Namespace:  Microsoft.VisualStudio.OLE.Interop
Assembly:  Microsoft.VisualStudio.OLE.Interop (in Microsoft.VisualStudio.OLE.Interop.dll)
Syntax
'Declaration
Function SetCapture ( _
    fCapture As Integer _
) As Integer
int SetCapture(
    int fCapture
)
int SetCapture(
    [InAttribute] int fCapture
)
abstract SetCapture : 
        fCapture:int -> int
function SetCapture(
    fCapture : int
) : int
Parameters
- fCapture 
 Type: Int32- [in] If TRUE, the container should capture the mouse for the object. If FALSE, the container should release mouse capture for the object. 
Return Value
Type: Int32
S_OK
Mouse capture was successfully granted to the object. If called to release the mouse capture, this method must not fail.
S_FALSE
Mouse capture was denied to the object.
Remarks
For information on the COM interface, see IOleInPlaceSiteWindowless::SetCapture
.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.