掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
リストファイルボックスにドラッグ&ドロップするには? (ID:110954)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
調べてみました。出来るっぽいです。 form1 file1を作って以下を貼り付け。 file1.OLEDropMode を1にする。 Private Sub File1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single) Dim i As Integer Dim strTempname As String If Data.Files.Count >= 1 Then For i = 1 To Data.Files.Count strTempname = Dir$(Data.Files(i)) If Len(strTempname) Then FileCopy Data.Files(i), myPathCheck(File1.Path) & strTempname End If Next i End If File1.Refresh Me.Refresh End Sub Private Sub Form_Load() File1.Path = App.Path End Sub Private Function myPathCheck(myPathname As String) As String Select Case Len(myPathname) Case 0 myPathCheck = "" Case Else myPathCheck = myPathname If Right$(myPathname, 1) <> "\" Then myPathCheck = myPathname & "\" End If End Select End Function こんな感じでチェック関連を入れればいいかなと思います。
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.