共用方式為


IVsIntellisenseHost.SetContextSelection 方法

設定選取項目,相對於內容的緩衝區。

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

語法

'宣告
Function SetContextSelection ( _
    iStartLine As Integer, _
    iStartIndex As Integer, _
    iEndLine As Integer, _
    iEndIndex As Integer _
) As Integer
int SetContextSelection(
    int iStartLine,
    int iStartIndex,
    int iEndLine,
    int iEndIndex
)
int SetContextSelection(
    [InAttribute] int iStartLine, 
    [InAttribute] int iStartIndex, 
    [InAttribute] int iEndLine, 
    [InAttribute] int iEndIndex
)
abstract SetContextSelection : 
        iStartLine:int * 
        iStartIndex:int * 
        iEndLine:int * 
        iEndIndex:int -> int
function SetContextSelection(
    iStartLine : int, 
    iStartIndex : int, 
    iEndLine : int, 
    iEndIndex : int
) : int

參數

  • iStartLine
    類型:Int32

    設定選取項目,相對於內容的緩衝區。

  • iStartIndex
    類型:Int32

    設定選取項目,相對於內容的緩衝區。

  • iEndLine
    類型:Int32

    設定選取項目,相對於內容的緩衝區。

  • iEndIndex
    類型:Int32

    設定選取項目,相對於內容的緩衝區。

傳回值

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

備註

C++

從 singlefileeditor.idl:

HRESULT IVsIntellisenseHost::SetContextSelection([in] long iStartLine, [in] long iStartIndex, [in] long iEndLine, [in] long iEndIndex);

.NET Framework 安全性

請參閱

參考

IVsIntellisenseHost 介面

Microsoft.VisualStudio.TextManager.Interop 命名空間