📄 frmmain.frm
字号:
EndProperty
BeginProperty Button17 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "View List"
Object.ToolTipText = "View List"
ImageIndex = 12
Style = 2
EndProperty
BeginProperty Button18 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "View Details"
Object.ToolTipText = "View Details"
ImageIndex = 13
Style = 2
Value = 1
EndProperty
EndProperty
End
End
Begin MSComctlLib.ImageList ImageList1
Left = 5640
Top = 2280
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 16711935
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 3
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":B7E8
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":BB3C
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":BE90
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.TreeView tvTreeView
Height = 4800
Left = 0
TabIndex = 2
Top = 705
Width = 2016
_ExtentX = 3545
_ExtentY = 8467
_Version = 393217
Indentation = 529
LineStyle = 1
PathSeparator = "/"
Style = 7
HotTracking = -1 'True
ImageList = "ImageList1"
Appearance = 1
End
Begin MSComctlLib.ListView lvListView
Height = 3960
Left = 2055
TabIndex = 1
Top = 1440
Width = 3210
_ExtentX = 5662
_ExtentY = 6985
View = 3
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = -1 'True
_Version = 393217
Icons = "imlLarge"
SmallIcons = "imlSmall"
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
NumItems = 3
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "File Name"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Text = "File Size"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 2
Text = "Last Write Date"
Object.Width = 2540
EndProperty
End
Begin MSComctlLib.StatusBar sbStatusBar
Align = 2 'Align Bottom
Height = 270
Left = 0
TabIndex = 0
Top = 5055
Width = 8970
_ExtentX = 15822
_ExtentY = 476
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 1
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Object.Width = 15399
EndProperty
EndProperty
End
Begin MSComDlg.CommonDialog dlgCommonDialog
Left = 1740
Top = 1350
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin MSComctlLib.ImageList imlToolbarIcons
Left = 1740
Top = 1350
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 22
ImageHeight = 20
MaskColor = 16711935
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 13
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":C1E4
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":C788
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":CD2C
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":D2D0
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":D874
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":DE18
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":E3BC
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":E960
Key = ""
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":EF04
Key = ""
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":F4A8
Key = ""
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":FA4C
Key = ""
EndProperty
BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":FFF0
Key = ""
EndProperty
BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":10594
Key = ""
EndProperty
EndProperty
End
Begin VB.Image imgSplitter
Height = 4788
Left = 1965
MouseIcon = "frmMain.frx":10B38
MousePointer = 99 'Custom
Top = 705
Width = 150
End
Begin VB.Menu mnuFile
Caption = "&File"
Begin VB.Menu mnuConnect
Caption = "&Connect to ..."
End
Begin VB.Menu sep1
Caption = "-"
End
Begin VB.Menu mnuDownload
Caption = "&Download File ..."
End
Begin VB.Menu mnuUpload
Caption = "&Upload File ..."
End
Begin VB.Menu sep2
Caption = "-"
End
Begin VB.Menu mnuFileClose
Caption = "&Close"
End
End
Begin VB.Menu mnuEdit
Caption = "&Edit"
Begin VB.Menu mnuRename
Caption = "&Rename File ..."
End
Begin VB.Menu mnuDelete
Caption = "&Delete File ..."
End
Begin VB.Menu sep3
Caption = "-"
End
Begin VB.Menu mnuCreateDir
Caption = "&Create Directory ..."
End
Begin VB.Menu mnuRemoveDir
Caption = "&Remove Directory"
End
End
Begin VB.Menu mnuView
Caption = "&View"
Begin VB.Menu mnuViewToolbar
Caption = "&Toolbar"
Checked = -1 'True
End
Begin VB.Menu mnuViewStatusBar
Caption = "Status &Bar"
Checked = -1 'True
End
Begin VB.Menu sep4
Caption = "-"
End
Begin VB.Menu mnuListViewMode
Caption = "Lar&ge Icons"
Index = 0
End
Begin VB.Menu mnuListViewMode
Caption = "S&mall Icons"
Index = 1
End
Begin VB.Menu mnuListViewMode
Caption = "&List"
Index = 2
End
Begin VB.Menu mnuListViewMode
Caption = "&Details"
Index = 3
End
Begin VB.Menu sep5
Caption = "-"
End
Begin VB.Menu mnuOptions
Caption = "&Options..."
End
End
Begin VB.Menu mnuHelp
Caption = "&Help"
Begin VB.Menu mnuHelpAbout
Caption = "&About "
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Const NAME_COLUMN = 0
Const TYPE_COLUMN = 1
Const SIZE_COLUMN = 2
Const DATE_COLUMN = 3
Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long
Dim mbMoving As Boolean
Const sglSplitLimit = 500
Private m_LastNode As Node
Private WithEvents m_FtpConnection As CFtpConnection
Attribute m_FtpConnection.VB_VarHelpID = -1
Private m_strFile As String
Private m_lFileSize As Long
Private Sub Check1_Click()
If Check1.Value Then
m_FtpConnection.PassiveMode = True
Else
m_FtpConnection.PassiveMode = False
End If
End Sub
Private Sub CoolBar1_HeightChanged(ByVal NewHeight As Single)
SizeControls picSplitter.Left
End Sub
Private Sub Form_Load()
Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500)
Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)
Set m_FtpConnection = New CFtpConnection
m_FtpConnection.Timeout = 180
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim i As Integer
Set m_FtpConnection = Nothing
'close all sub forms
For i = Forms.Count - 1 To 1 Step -1
Unload Forms(i)
Next
If Me.WindowState <> vbMinimized Then
SaveSetting App.Title, "Settings", "MainLeft", Me.Left
SaveSetting App.Title, "Settings", "MainTop", Me.Top
SaveSetting App.Title, "Settings", "MainWidth", Me.Width
SaveSetting App.Title, "Settings", "MainHeight", Me.Height
End If
SaveSetting App.Title, "Settings", "ViewMode", lvListView.View
End Sub
Private Sub Form_Resize()
On Error Resume Next
If Me.Width < 3000 Then Me.Width = 3000
SizeControls imgSplitter.Left
End Sub
Private Sub imgSplitter_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
With imgSplitter
picSplitter.Move .Left, .Top, .Width \ 2, .Height - 20
End With
picSplitter.Visible = True
mbMoving = True
LockWindowUpdate Me.hwnd
End Sub
Private Sub imgSplitter_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim sglPos As Single
If mbMoving Then
sglPos = x + imgSplitter.Left
If sglPos < sglSplitLimit Then
picSplitter.Left = sglSplitLimit
ElseIf sglPos > Me.Width - sglSplitLimit Then
picSplitter.Left = Me.Width - sglSplitLimit
Else
picSplitter.Left = sglPos
End If
End If
End Sub
Private Sub imgSplitter_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
SizeControls picSplitter.Left
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -