📄 modmain.bas
字号:
Attribute VB_Name = "modMain"
Option Explicit
Public STRCONTENT As String
'******************************************
Public Sub Main()
'Command$ can be used to pass the full path name of the vbftp.txt file
'If there is no Command$ then it assumes that it uses the default text file
'in the same location as the executable.
If Command$ = "" Then 'if no command on the command line
Load frmMain
frmMain.Show
Else
Dim logfile As New clsLogFile
logfile.AddToLogFile ("********************" & vbCrLf)
logfile.AddToLogFile ("FTP started at " & Now() & vbCrLf)
Dim clsFTP As New clsTransfer
clsFTP.DoTransfer (Command$)
End If
End Sub
'******************************************
Public Function GetState(s As Integer) As String
Select Case s
Case 0
GetState = "No state information is available."
Case 1
GetState = "Looking up the IP address for the remote server."
Case 2
GetState = "Found the IP address for the remote server."
Case 3
GetState = "Connecting to the remote server."
Case 4
GetState = "Connected to the remote server."
Case 5
GetState = "Requesting information from the remote server."
Case 6
GetState = "The request was sent successfully to the remote server."
Case 7
GetState = "Receiving a response from the remote server."
Case 8
GetState = "The response was received successfully from the remote server."
Case 9
GetState = "Disconnecting from the remote server."
Case 10
GetState = "Disconnected from the remote server."
Case 11
GetState = "An error has occurred while communicating with the remote server."
Case 12
GetState = "The request complete, files have been received."
Case Else
GetState = "Unknown state: " & FormatNumber(s, 0)
End Select
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -