DocumentList.SelectedDirectoryChanged Event
.NET Framework 2.0
Occurs when a folder is selected in a DocumentList control.
Namespace: Microsoft.WindowsCE.Forms
Assembly: Microsoft.WindowsCE.Forms (in microsoft.windowsce.forms.dll)
Assembly: Microsoft.WindowsCE.Forms (in microsoft.windowsce.forms.dll)
'Declaration Public Event SelectedDirectoryChanged As EventHandler 'Usage Dim instance As DocumentList Dim handler As EventHandler AddHandler instance.SelectedDirectoryChanged, handler
/** @event */ public void add_SelectedDirectoryChanged (EventHandler value) /** @event */ public void remove_SelectedDirectoryChanged (EventHandler value)
JScript supports the use of events, but not the declaration of new ones.
You can handle this event and use the currently selected folder to open and close files. The SelectedDirectory property contains currently selected folder.
For more information about handling events, see Consuming Events.
The following code example shows a method that handles the SelectedDirectoryChanged event. This code example is part of a larger example provided for the DocumentList class.
' Handle the SelectedDirectoryChanged ' event with code that sets the correct ' path for opening and closing files. Private Sub DocList_SelectedDirectoryChanged(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles DocumentList1.SelectedDirectoryChanged StatusBar1.Text = "Folder: " & DocumentList1.SelectedDirectory ' Add code to access the selected folder to open and close files. End Sub
Windows Mobile for Pocket PC
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Community Additions
ADD
Show: