📄 frmmain.frm
字号:
VERSION 5.00
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "Mswinsck.ocx"
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Begin VB.Form frmMain
BorderStyle = 1 'Fixed Single
Caption = "Simple Mail Reader"
ClientHeight = 6000
ClientLeft = 45
ClientTop = 330
ClientWidth = 7335
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6000
ScaleWidth = 7335
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton cmdDel
Caption = "E&xit"
Height = 375
Left = 5880
TabIndex = 10
Top = 5520
Width = 1335
End
Begin VB.CommandButton cmdCheckMail
Caption = "&Check mailbox"
Height = 375
Left = 4440
TabIndex = 9
Top = 5520
Width = 1335
End
Begin MSWinsockLib.Winsock Winsock1
Left = 3480
Top = 2760
_ExtentX = 741
_ExtentY = 741
_Version = 393216
End
Begin VB.TextBox txtBody
BeginProperty Font
Name = "Courier New"
Size = 9.75
Charset = 204
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2655
Left = 120
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 7
Text = "frmMain.frx":0000
Top = 2760
Width = 7095
End
Begin VB.Frame Frame4
Caption = "Messages"
Height = 1815
Left = 120
TabIndex = 6
Top = 840
Width = 7095
Begin ComctlLib.ListView lvMessages
Height = 1455
Left = 120
TabIndex = 8
Top = 240
Width = 6855
_ExtentX = 12091
_ExtentY = 2566
View = 3
LabelWrap = -1 'True
HideSelection = -1 'True
_Version = 327682
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
NumItems = 4
BeginProperty ColumnHeader(1) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
Key = ""
Object.Tag = ""
Text = "From"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(2) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 1
Key = ""
Object.Tag = ""
Text = "Subject"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(3) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 2
Key = ""
Object.Tag = ""
Text = "Date"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(4) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 3
Key = ""
Object.Tag = ""
Text = "Size"
Object.Width = 2540
EndProperty
End
End
Begin VB.Frame Frame3
Caption = "Password:"
Height = 615
Left = 4920
TabIndex = 4
Top = 120
Width = 2295
Begin VB.TextBox txtPassword
Height = 285
IMEMode = 3 'DISABLE
Left = 120
PasswordChar = "*"
TabIndex = 5
Text = "txtPassword"
Top = 240
Width = 2055
End
End
Begin VB.Frame Frame2
Caption = "User Name:"
Height = 615
Left = 2520
TabIndex = 2
Top = 120
Width = 2295
Begin VB.TextBox txtUserName
Height = 285
Left = 120
TabIndex = 3
Text = "txtUserName"
Top = 240
Width = 2055
End
End
Begin VB.Frame Frame1
Caption = "Remote Host:"
Height = 615
Left = 120
TabIndex = 0
Top = 120
Width = 2295
Begin VB.TextBox txtHost
Height = 285
Left = 120
TabIndex = 1
Text = "txtHost"
Top = 240
Width = 2055
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Enum POP3States
POP3_Connect
POP3_USER
POP3_PASS
POP3_STAT
POP3_RETR
POP3_DELE
POP3_QUIT
End Enum
Private m_State As POP3States
Private m_oMessage As CMessage
Private m_colMessages As New CMessages
'
Private Sub cmdCheckMail_Click()
'Check the emptiness of all the text fields except for the txtBody
For Each c In Controls
If TypeOf c Is TextBox And c.Name <> "txtBody" Then
If Len(c.Text) = 0 Then
MsgBox c.Name & " can't be empty", vbCritical
Exit Sub
End If
End If
Next
'
'Change the value of current session state
m_State = POP3_Connect
'
'Close the socket in case it was opened while another session
Winsock1.Close
'
'reset the value of the local port in order to let to the
'Windows Sockets select the new one itself
'It's necessary in order to prevent the "Address in use" error,
'which can appear if the Winsock Control has already used while the
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -