| | タイトル | : Re: WIAからのファイルのドラッグについて |  | 記事No | : 13029 |  | 投稿日 | : 2008/09/09(Tue) 14:46 |  | 投稿者 | : K.J.K. | 
 例えば、
 Private Declare Function GetClipboardFormatName _
 Lib "user32.dll" Alias "GetClipboardFormatNameA" _
 (ByVal FormatID As Long, ByVal Buffer As String, ByVal Length As Long) As Long
 
 Private Sub Form_OLEDragDrop(Data As DataObject, Effect As Long, _
 Button As Integer, Shift As Integer, X As Single, Y As Single)
 Dim iLoop As Integer
 If Data.GetFormat(vbCFFiles) Then
 Set Picture1.Picture = LoadPicture(Data.Files(1))
 Else
 For iLoop = &HC000 To &HFFFF
 If Data.GetFormat(iLoop) Then Debug.Print GetFormatName(iLoop)
 Next iLoop
 End If
 End Sub
 
 Private Function GetFormatName(ByVal FormatID As Integer) As String
 Dim sBuffer As String
 Dim iID As Long
 sBuffer = String$(256&, vbNullChar)
 iID = CLng(FormatID) & &HFFFF&
 If GetClipboardFormatName(iID, sBuffer, 255&) Then
 GetFormatName = Strings.Left$(sBuffer, InStr(1&, sBuffer, vbNullChar) - 1&)
 End If
 End Function
 
 などして、実際に使われているデータ転送のフォーマットを調べてみるとか。
 
 |