My.Computer.Clipboard.ContainsFileDropList Method
Returns a Boolean indicating whether the Clipboard contains a file drop list.
' Usage
Dim value As Boolean = My.Computer.Clipboard.ContainsFileDropList()
' Declaration
Public Function ContainsFileDropList() As Boolean
Return Value
True if a file drop list is stored on the Clipboard; otherwise False.
Remarks
A file drop list is a collection of strings containing path information for files.
Example
This example determines if there is a file drop list on the Clipboard and adds the list to the ListBoxlstFiles if they exist.
If My.Computer.Clipboard.ContainsFileDropList Then
Dim filelist As System.Collections.Specialized.StringCollection
filelist = My.Computer.Clipboard.GetFileDropList()
For Each filePath As String In filelist
lstFiles.Items.Add(filePath)
Next
End If
This code will create an exception if there is no ListBox named lstFiles.
Requirements
Namespace:Microsoft.VisualBasic.MyServices
Class:ClipboardProxy (provides access to Clipboard)
Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)
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 |
Permissions
No permissions are required.
See Also
Reference
Clipboard.ContainsFileDropList
My.Computer.Clipboard.GetFileDropList Method
My.Computer.Clipboard.SetFileDropList Method