|
' ******************************************************
' ドラッグドロップ
' ******************************************************
Public Sub DragDropAction(frm As Form, x As Single, Source As Control, Target As Object)
Dim rc As RECT
GetClientRect frm.hwnd, rc
Select Case nDrag
Case DRAG_BAR
' 変更
If Target.Name = "trvサーバ" Then
nWidthTreeView = x
Else
nWidthTreeView = frm.trvサーバ.Width + x
End If
With frm.trvサーバ
.Width = nWidthTreeView
.Height = frm.ScaleY(rc.Bottom, vbPixels, vbTwips)
End With
With frm.drgBar
.Left = frm.trvサーバ.Width
.Top = 0
.Height = frm.ScaleY(rc.Bottom, vbPixels, vbTwips)
End With
' 追加
With frm.lstローカル
.Left = frm.trvサーバ.Width + frm.drgBar.Width
.Top = 0
.Width = frm.Width - nWidthTreeView - frm.drgBar.Width
.Width = frm.ScaleX(rc.Right, vbPixels, vbTwips) _
- nWidthTreeView _
- frm.drgBar.Width
.Height = frm.ScaleY(rc.Bottom, vbPixels, vbTwips)
End With
Case DRAG_FTPFILE
If Target.Name = "Form2" Then
Dim nodフォルダ As Node
Set nodフォルダ = frm.trvサーバ.SelectedItem
MsgBox nodフォルダ.FullPath
End If
End Select
End Sub
| |