ClipboardProxy.GetFileDropList Method

Definition

Retrieves a collection of strings representing file names from the Clipboard.

public:
 System::Collections::Specialized::StringCollection ^ GetFileDropList();
public System.Collections.Specialized.StringCollection GetFileDropList ();
member this.GetFileDropList : unit -> System.Collections.Specialized.StringCollection
Public Function GetFileDropList () As StringCollection

Returns

A StringCollection containing file names or Nothing if the Clipboard does not contain any data that is in the FileDrop format or can be converted to that format.

Examples

This example determines if there is a file drop list on the Clipboard and adds the list to the ListBox.lstFiles if they exist.

If My.Computer.Clipboard.ContainsFileDropList Then
   Dim filelist = My.Computer.Clipboard.GetFileDropList()
   For Each filePath In filelist
       lstFiles.Items.Add(filePath)
   Next
End If

This code creates an exception if there is no ListBox named lstFiles.

Remarks

This method is available only for non-server applications.

A file drop list is a collection of strings containing path information for files.

Availability by Project Type

Project type Available
Windows Application Yes
Class Library Yes
Console Application Yes
Windows Control Library Yes
Web Control Library No
Windows Service Yes
Web Site No

Applies to

See also