DocumentList.DocumentActivated Event
Occurs when a file is selected in a DocumentList control.
Namespace: Microsoft.WindowsCE.Forms
Assembly: Microsoft.WindowsCE.Forms (in Microsoft.WindowsCE.Forms.dll)
Syntax
'Declaration
Public Event DocumentActivated As DocumentListEventHandler
'Usage
Dim instance As DocumentList
Dim handler As DocumentListEventHandler
AddHandler instance.DocumentActivated, handler
public event DocumentListEventHandler DocumentActivated
public:
event DocumentListEventHandler^ DocumentActivated {
void add (DocumentListEventHandler^ value);
void remove (DocumentListEventHandler^ value);
}
JScript does not support events.
Remarks
You can handle this event to open the selected file. Use the Path property to get the path to the file.
This event does not occur when the user activates a shortcut menu associated with the DocumentList control.
For more information about handling events, see Consuming Events.
Examples
The following code example shows a method that handles the DocumentActivated event. This code example is part of a larger example provided for the DocumentList class.
' Handle the DocumentedActivated
' event with code to open the file.
Private Sub DocList_DocumentActivated(ByVal sender As Object, _
ByVal docevent As Microsoft.WindowsCE.Forms.DocumentListEventArgs) Handles DocumentList1.DocumentActivated
StatusBar1.Text = "Activated: " & docevent.Path
' Add code to open the selected file.
End Sub
private void OnDocActivated(object obj, DocumentListEventArgs docg)
{
statusBar1.Text = "Activated: " + docg.Path;
// Add code to open the selected file.
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Platforms
Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Compact Framework
Supported in: 3.5, 2.0