共用方式為


DocumentListEventArgs 類別

提供 DeletingDocumentDocumentActivated 事件的資料。

命名空間:  Microsoft.WindowsCE.Forms
組件:  Microsoft.WindowsCE.Forms (在 Microsoft.WindowsCE.Forms.dll 中)

語法

'宣告
Public Class DocumentListEventArgs _
    Inherits EventArgs
'用途
Dim instance As DocumentListEventArgs
public class DocumentListEventArgs : EventArgs
public ref class DocumentListEventArgs : public EventArgs
public class DocumentListEventArgs extends EventArgs

備註

此事件資料包含已刪除或已啟動的檔案路徑,可讓您撰寫應用程式以關閉或開啟檔案。

範例

下列程式碼範例定義處理 DeletingDocument 事件的方法。它使用 DocumentListEventArgs 的 Path 屬性來取得已刪除檔案的路徑。這個程式碼範例是 DocumentList 類別完整範例的一部分。

' Handle the DeletingDocument 
' event with code to close the file.
 Private Sub DocList_DeletingDocument(ByVal sender As Object, _
 ByVal docevent As Microsoft.WindowsCE.Forms.DocumentListEventArgs) _
 Handles DocumentList1.DeletingDocument

     StatusBar1.Text = "Deleted: " & docevent.Path
     ' Add code to close any instances of the file.
 End Sub
private void OnDelDoc(object obj, DocumentListEventArgs docg)
{
    statusBar1.Text += "Deleted: " + docg.Path;

    // Add code to close any instances of the file.
}

繼承階層架構

System.Object
  System.EventArgs
    Microsoft.WindowsCE.Forms.DocumentListEventArgs

執行緒安全

這個型別的任何 Public static (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。並非所有的執行個體成員都是安全執行緒。

平台

Windows Mobile for Pocket PC

.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求

版本資訊

.NET Compact Framework

支援版本:3.5、2.0

請參閱

參考

DocumentListEventArgs 成員

Microsoft.WindowsCE.Forms 命名空間

其他資源

HOW TO:使用 DocumentList 控制項