IncrementalSearch.DTE 屬性
取得最上層的擴充性物件。
命名空間: EnvDTE80
組件: EnvDTE80 (在 EnvDTE80.dll 中)
語法
'宣告
ReadOnly Property DTE As DTE
DTE DTE { get; }
property DTE^ DTE {
DTE^ get ();
}
abstract DTE : DTE with get
function get DTE () : DTE
屬性值
類型:DTE
DTE 物件。
備註
在 Visual Studio 中,DTE 物件是 Automation 模型的根物件,Automation 物件在其他物件模型中經常稱為「應用程式」。
範例
Sub testIS2()
' Before running, open a document in Visual Studio.
' Set variables for text pane.
Dim tp As EnvDTE80.TextPane2
tp = CType(DTE.ActiveDocument.ActiveWindow.Object.ActivePane, _
TextPane2)
' Start an incremental search backward from
' the current insertion point in the document.
tp.IncrementalSearch.StartBackward()
' Add the character "a" to the search pattern.
tp.IncrementalSearch.AppendCharAndSearch(Asc("a"))
' Display the parent name for IncrementalSearch object.
MsgBox("IncrementalSearch parent: " & _
tp.IncrementalSearch.DTE.FullName)
MsgBox("Search pattern length: " & _
tp.IncrementalSearch.Pattern.Length)
' Perform incremental search using the pattern ("a").
tp.IncrementalSearch.SearchWithLastPattern()
' After the search, exit incremental search mode.
MsgBox("DeleteCharAndBackup")
tp.IncrementalSearch.DeleteCharAndBackup()
MsgBox("SearchForward")
tp.IncrementalSearch.SearchForward()
MsgBox("SearchBackward")
tp.IncrementalSearch.SearchBackward()
MsgBox("Exit")
tp.IncrementalSearch.Exit()
End Sub
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。