为指定的文本。
命名空间: Microsoft.VisualStudio.TextManager.Interop
程序集: Microsoft.VisualStudio.TextManager.Interop(在 Microsoft.VisualStudio.TextManager.Interop.dll 中)
语法
声明
Function SetSelection ( _
iAnchorLine As Integer, _
iAnchorCol As Integer, _
iEndLine As Integer, _
iEndCol As Integer _
) As Integer
int SetSelection(
int iAnchorLine,
int iAnchorCol,
int iEndLine,
int iEndCol
)
int SetSelection(
[InAttribute] int iAnchorLine,
[InAttribute] int iAnchorCol,
[InAttribute] int iEndLine,
[InAttribute] int iEndCol
)
abstract SetSelection :
iAnchorLine:int *
iAnchorCol:int *
iEndLine:int *
iEndCol:int -> int
function SetSelection(
iAnchorLine : int,
iAnchorCol : int,
iEndLine : int,
iEndCol : int
) : int
参数
iAnchorLine
类型:Int32[in] 定位点选择的行位置。
iAnchorCol
类型:Int32[in] 定位点选择的列位置。 Viewcol 坐标可以包括虚拟空间。
iEndLine
类型:Int32[in] 结束选择的行位置。
iEndCol
类型:Int32[in] 选择的结尾列位置。 Viewcol 坐标可以包括虚拟空间。
返回值
类型:Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。
备注
COM 签名
从 textmgr.idl:
HRESULT IVsTextView::SetSelection(
[in] long iAnchorLine,
[in] ViewCol iAnchorCol,
[in] long iEndLine,
[in] ViewCol iEndCol
);
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。