IVsTextView.ClearSelection 方法
清除目前的選取範圍。
命名空間: Microsoft.VisualStudio.TextManager.Interop
組件: Microsoft.VisualStudio.TextManager.Interop (在 Microsoft.VisualStudio.TextManager.Interop.dll 中)
語法
'宣告
Function ClearSelection ( _
fMoveToAnchor As Integer _
) As Integer
int ClearSelection(
int fMoveToAnchor
)
int ClearSelection(
[InAttribute] int fMoveToAnchor
)
abstract ClearSelection :
fMoveToAnchor:int -> int
function ClearSelection(
fMoveToAnchor : int
) : int
參數
fMoveToAnchor
類型:Int32[in]如果true,游標會置於錨點之後會清除目前的選取範圍。 如果false,則不會移動游標。
傳回值
類型:Int32
如果此方法將會成功,則會傳回S_OK。如果失敗,它就會傳回錯誤碼。
備註
COM 簽章
從 textmgr.idl:
HRESULT IVsTextView::ClearSelection(
[in] BOOL fMoveToAnchor
);
錨點位置是使用滑鼠的使用者所選取的第一個位置。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。