本文整理匯總了VB.NET中System.Windows.Forms.Clipboard.GetFileDropList方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET Clipboard.GetFileDropList方法的具體用法?VB.NET Clipboard.GetFileDropList怎麽用?VB.NET Clipboard.GetFileDropList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Forms.Clipboard
的用法示例。
在下文中一共展示了Clipboard.GetFileDropList方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: SwapClipboardFileDropList
' Demonstrates SetFileDropList, ContainsFileDroList, and GetFileDropList
Public Function SwapClipboardFileDropList(ByVal replacementList _
As System.Collections.Specialized.StringCollection) _
As System.Collections.Specialized.StringCollection
Dim returnList As System.Collections.Specialized.StringCollection _
= Nothing
If Clipboard.ContainsFileDropList() Then
returnList = Clipboard.GetFileDropList()
Clipboard.SetFileDropList(replacementList)
End If
Return returnList
End Function
示例2: Clipboard.GetFileDropList()
' 導入命名空間
Imports System.Drawing.Drawing2D
Imports System
Imports System.Drawing.Text
Imports System.Drawing
Imports System.Windows.Forms
Imports System.Math
Imports System.Xml.Serialization
Imports System.IO
Imports System.Collections.Specialized
Public Class MainClass
Shared Sub Main()
'Copy some files then run this program
If Clipboard.ContainsFileDropList() Then
Dim file_names As StringCollection = Clipboard.GetFileDropList()
For Each file_name As String In file_names
Console.WriteLine(file_name)
Next file_name
End If
End Sub
End Class