13) DriveListBox の追加

  Form_Resize イベント



  
    With Me.drvローカル
        .Left = Me.trvサーバ.Width + Me.drgBar.Width
        .Top = 0
        .Width = Me.ScaleX(rc.Right, vbPixels, vbTwips) _
            - nWidthTreeView _
            - Me.drgBar.Width
    End With

    With Me.lstローカル
        .Left = Me.trvサーバ.Width + Me.drgBar.Width

        .Top = Me.drvローカル.Height

        .Width = Me.ScaleX(rc.Right, vbPixels, vbTwips) _
            - nWidthTreeView _
            - Me.drgBar.Width

        .Height = Me.ScaleY(rc.Bottom, vbPixels, vbTwips) _
            + Me.drvローカル.Height

    End With
  



  DragDropAction サブ



  
' ******************************************************
' ドラッグドロップ
' ******************************************************
Public Sub DragDropAction(frm As Form, x As Single, Source As Control, Target As Object)

    Dim rc As RECT
    Dim strPath As String
    Dim strRet As String
    
    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.drvローカル
                .Left = frm.trvサーバ.Width + frm.drgBar.Width
                .Top = 0
                .Width = frm.ScaleX(rc.Right, vbPixels, vbTwips) _
                    - nWidthTreeView _
                    - frm.drgBar.Width
            End With

            With frm.lstローカル
                .Left = frm.trvサーバ.Width + frm.drgBar.Width

                .Top = frm.drvローカル.Height

                .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) _
                    - frm.drvローカル.Height

            End With
        
        Case DRAG_FTPFILE
        
            Dim nodフォルダ As Node
            Set nodフォルダ = frm.trvサーバ.SelectedItem
    
            If Target.Name = "lstローカル" Then
                strPath = frm.filローカル.Path & "\" & nodフォルダ.Text
                If vbOK = MsgBox("ダウンロードを開始します。よろしいですか?", vbOKCancel) Then
                    strRet = Module1.lbFTPDownload("/" & nodフォルダ.FullPath, strPath)
                    If strRet <> "" Then
                        MsgBox (strRet)
                    Else
                        MsgBox ("ダウンロードが終了しました")
                        LoadListView frm
                    End If
                End If
            End If
    
    End Select
    
End Sub
  



  ドライブ変更時の処理

  
' ************************************
' ドライブ変更
' ************************************
Private Sub drvローカル_Change()

    ChDrive (Me.drvローカル.Drive)
    Module2.LoadListView Me

End Sub

  










  infoboard   管理者用   
このエントリーをはてなブックマークに追加





フリーフォントWEBサービス
SQLの窓WEBサービス

SQLの窓フリーソフト

素材

一般WEBツールリンク

SQLの窓

フリーソフト

JSライブラリ