затем делаю, вот код:
- Код: Выделить всё
Declare Sub DragFinish Lib "shell32.dll" (ByVal HDROP As Long)
Declare Function DragQueryFile Lib "shell32.dll" Alias "DragQueryFileA" (ByVal HDROP As Long, ByVal UINT As Long, ByVal lpStr As String, ByVal ch As Long) As Long
'----------------
Public Function WindowProc(ByVal hWnd As Long, ByVal iMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Dim lpBuffer As String
lpBuffer = String$(1024, 0)
Select Case iMsg
Case WM_DROPFILES
'DragQueryFile wParam,Индекс файла, lpBuffer, 1024
DragQueryFile wParam, 0, lpBuffer, 1024
frmShell.txtDragDrop.Text = lpBuffer
frmShell.List1.AddItem lpBuffer
DragFinish wParam
End Select
WindowProc = CallWindowProc(hPrevWndProc, hWnd, iMsg, wParam, lParam)
End Function
'In Form
Private Sub Form_Load()
hPrevWndProc = SetWindowLong(Picture1.hWnd, GWL_WNDPROC, AddressOf WindowProc)
If hPrevWndProc <> 0 Then
bIsSubclassed = True
' Set drag and drop
DragAcceptFiles Picture1.hWnd, True
End If
End Sub
и не знаю как полуxчить количество вделеннх файлов? помогите кто чем может