共用方式為


IVsTextView.SetSelectionMode 方法

設定選取模式而定。

命名空間:  Microsoft.VisualStudio.TextManager.Interop
組件:  Microsoft.VisualStudio.TextManager.Interop (在 Microsoft.VisualStudio.TextManager.Interop.dll 中)

語法

'宣告
Function SetSelectionMode ( _
    iSelMode As TextSelMode _
) As Integer
int SetSelectionMode(
    TextSelMode iSelMode
)
int SetSelectionMode(
    [InAttribute] TextSelMode iSelMode
)
abstract SetSelectionMode : 
        iSelMode:TextSelMode -> int
function SetSelectionMode(
    iSelMode : TextSelMode
) : int

參數

傳回值

類型:Int32
如果此方法將會成功,則會傳回S_OK。如果失敗,它就會傳回錯誤碼。

備註

COM 簽章

從 textmgr.idl:

HRESULT IVsTextView::SetSelectionMode(
   [in] TextSelMode iSelMode
);

使用這個方法來設定資料流或] 方塊中選取項目是否為目前的選取模式。 如需詳細資訊,請參閱 TextSelMode

.NET Framework 安全性

請參閱

參考

IVsTextView 介面

Microsoft.VisualStudio.TextManager.Interop 命名空間