📄 mailocx.ctl
字号:
.lblcc.Caption = recc
.mailfrom = msg.From
.popuser = CvrP.Decode(Me.pop3username)
.poppass = CvrP.Decode(Me.pop3password)
.popserver = CvrP.Decode(Me.pop3servername)
.smtpuser = CvrP.Decode(Me.smtpUsername)
.smtppass = CvrP.Decode(Me.smtppassword)
.smtpserver = CvrP.Decode(Me.smtpservername)
End With
separator = ", "
For i = 0 To msg.attachments.Count - 1
If i = msg.attachments.Count - 1 Then
separator = ""
End If
Set at = msg.attachments(i)
frmnew.lblatt.Caption = frmnew.lblatt.Caption & at.Name & separator
frmnew.Caption = CStr(at.Size)
Next i
frmnew.mailindex = maillist.SelectedItem.Tag
frmnew.Show 1
' pop3.Disconnect
' Set pop3 = Nothing
Exit Sub
Label1:
MsgBox Err.Description
If ifconnect = True Then
pop3.Disconnect
Set pop3 = Nothing
ifconnect = False
End If
End Sub
Private Sub Picture1_Click()
End Sub
Private Sub UserControl_Terminate()
If ifconnect Then
pop3.Disconnect
Set pop3 = Nothing
End If
End Sub
'注意!不要删除或修改下列被注释的行!
'MappingInfo=UserControl,UserControl,-1,PropertyPages
Public Property Get BackColor(ByVal Index As Integer) As String
Attribute BackColor.VB_Description = "返回/设置用户控件的属性页的名称"
BackColor = UserControl.PropertyPages(Index)
End Property
Public Property Let BackColor(ByVal Index As Integer, ByVal New_BackColor As String)
UserControl.PropertyPages(Index) = New_BackColor
PropertyChanged "BackColor"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=8,0,0,0
Public Property Get ForeColor() As Long
Attribute ForeColor.VB_Description = "返回/设置对象中文本和图形的前景色。"
ForeColor = m_ForeColor
End Property
Public Property Let ForeColor(ByVal New_ForeColor As Long)
m_ForeColor = New_ForeColor
PropertyChanged "ForeColor"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=0,0,0,0
Public Property Get Enabled() As Boolean
Attribute Enabled.VB_Description = "返回/设置一个值,决定一个对象是否响应用户生成事件。"
Enabled = m_Enabled
End Property
Public Property Let Enabled(ByVal New_Enabled As Boolean)
m_Enabled = New_Enabled
PropertyChanged "Enabled"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=6,0,0,0
Public Property Get Font() As Font
Attribute Font.VB_Description = "返回一个 Font 对象。"
Attribute Font.VB_UserMemId = -512
Set Font = m_Font
End Property
Public Property Set Font(ByVal New_Font As Font)
Set m_Font = New_Font
PropertyChanged "Font"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=7,0,0,0
Public Property Get BackStyle() As Integer
Attribute BackStyle.VB_Description = "指出 Label 或 Shape 的背景样式是透明的还是不透明的。"
BackStyle = m_BackStyle
End Property
Public Property Let BackStyle(ByVal New_BackStyle As Integer)
m_BackStyle = New_BackStyle
PropertyChanged "BackStyle"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=7,0,0,0
Public Property Get BorderStyle() As Integer
Attribute BorderStyle.VB_Description = "返回/设置对象的边框样式。"
BorderStyle = m_BorderStyle
End Property
Public Property Let BorderStyle(ByVal New_BorderStyle As Integer)
m_BorderStyle = New_BorderStyle
PropertyChanged "BorderStyle"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=5
Public Sub Refresh()
Attribute Refresh.VB_Description = "强制完全重画一个对象。"
End Sub
'注意!不要删除或修改下列被注释的行!
'MemberInfo=13,0,0,0
Public Property Get smtpUsername() As String
smtpUsername = m_smtpUsername
End Property
Public Property Let smtpUsername(ByVal New_smtpUsername As String)
m_smtpUsername = New_smtpUsername
PropertyChanged "smtpUsername"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=13,0,0,0
Public Property Get smtppassword() As String
smtppassword = m_smtppassword
End Property
Public Property Let smtppassword(ByVal New_smtppassword As String)
m_smtppassword = New_smtppassword
PropertyChanged "smtppassword"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=13,0,0,0
Public Property Get smtpservername() As String
smtpservername = m_smtpservername
End Property
Public Property Let smtpservername(ByVal New_smtpservername As String)
m_smtpservername = New_smtpservername
PropertyChanged "smtpservername"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=14,0,0,25
Public Property Get smtpport() As Variant
smtpport = m_smtpport
End Property
Public Property Let smtpport(ByVal New_smtpport As Variant)
m_smtpport = New_smtpport
PropertyChanged "smtpport"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=13,0,0,0
Public Property Get pop3username() As String
pop3username = m_pop3username
End Property
Public Property Let pop3username(ByVal New_pop3username As String)
m_pop3username = New_pop3username
PropertyChanged "pop3username"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=13,0,0,0
Public Property Get pop3password() As String
pop3password = m_pop3password
End Property
Public Property Let pop3password(ByVal New_pop3password As String)
m_pop3password = New_pop3password
PropertyChanged "pop3password"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=13,0,0,0
Public Property Get pop3servername() As String
pop3servername = m_pop3servername
End Property
Public Property Let pop3servername(ByVal New_pop3servername As String)
m_pop3servername = New_pop3servername
PropertyChanged "pop3servername"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=8,0,0,110
Public Property Get pop3port() As Long
pop3port = m_pop3port
End Property
Public Property Let pop3port(ByVal New_pop3port As Long)
m_pop3port = New_pop3port
PropertyChanged "pop3port"
End Property
'为用户控件初始化属性
Private Sub UserControl_InitProperties()
m_ForeColor = m_def_ForeColor
m_Enabled = m_def_Enabled
Set m_Font = Ambient.Font
m_BackStyle = m_def_BackStyle
m_BorderStyle = m_def_BorderStyle
m_smtpUsername = m_def_smtpUsername
m_smtppassword = m_def_smtppassword
m_smtpservername = m_def_smtpservername
m_smtpport = m_def_smtpport
m_pop3username = m_def_pop3username
m_pop3password = m_def_pop3password
m_pop3servername = m_def_pop3servername
m_pop3port = m_def_pop3port
m_EmailAddress = m_def_EmailAddress
Set CvrP = CreateObject("crypt.clscrypt")
End Sub
'从存贮器中加载属性值
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
Dim Index As Integer
'TO DO: 你映射到的成员包含数据数组。
' 您必须提供代码来保持数组。
' 以下显示原型行:
UserControl.PropertyPages(Index) = PropBag.ReadProperty("BackColor" & Index, "&H80000009&")
m_ForeColor = PropBag.ReadProperty("ForeColor", m_def_ForeColor)
m_Enabled = PropBag.ReadProperty("Enabled", m_def_Enabled)
Set m_Font = PropBag.ReadProperty("Font", Ambient.Font)
m_BackStyle = PropBag.ReadProperty("BackStyle", m_def_BackStyle)
m_BorderStyle = PropBag.ReadProperty("BorderStyle", m_def_BorderStyle)
m_smtpUsername = PropBag.ReadProperty("smtpUsername", m_def_smtpUsername)
m_smtppassword = PropBag.ReadProperty("smtppassword", m_def_smtppassword)
m_smtpservername = PropBag.ReadProperty("smtpservername", m_def_smtpservername)
m_smtpport = PropBag.ReadProperty("smtpport", m_def_smtpport)
m_pop3username = PropBag.ReadProperty("pop3username", m_def_pop3username)
m_pop3password = PropBag.ReadProperty("pop3password", m_def_pop3password)
m_pop3servername = PropBag.ReadProperty("pop3servername", m_def_pop3servername)
m_pop3port = PropBag.ReadProperty("pop3port", m_def_pop3port)
m_EmailAddress = PropBag.ReadProperty("EmailAddress", m_def_EmailAddress)
' Set m_Recordset = PropBag.ReadProperty("Recordset", Nothing)
Set Recordset = PropBag.ReadProperty("Recordset", Nothing)
End Sub
'将属性值写到存储器
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Dim Index As Integer
'TO DO: 你映射到的成员包含数据数组。
' 您必须提供代码来保持数组。
' 以下显示原型行:
Call PropBag.WriteProperty("BackColor" & Index, UserControl.PropertyPages(Index), "&H80000009&")
Call PropBag.WriteProperty("ForeColor", m_ForeColor, m_def_ForeColor)
Call PropBag.WriteProperty("Enabled", m_Enabled, m_def_Enabled)
Call PropBag.WriteProperty("Font", m_Font, Ambient.Font)
Call PropBag.WriteProperty("BackStyle", m_BackStyle, m_def_BackStyle)
Call PropBag.WriteProperty("BorderStyle", m_BorderStyle, m_def_BorderStyle)
Call PropBag.WriteProperty("smtpUsername", m_smtpUsername, m_def_smtpUsername)
Call PropBag.WriteProperty("smtppassword", m_smtppassword, m_def_smtppassword)
Call PropBag.WriteProperty("smtpservername", m_smtpservername, m_def_smtpservername)
Call PropBag.WriteProperty("smtpport", m_smtpport, m_def_smtpport)
Call PropBag.WriteProperty("pop3username", m_pop3username, m_def_pop3username)
Call PropBag.WriteProperty("pop3password", m_pop3password, m_def_pop3password)
Call PropBag.WriteProperty("pop3servername", m_pop3servername, m_def_pop3servername)
Call PropBag.WriteProperty("pop3port", m_pop3port, m_def_pop3port)
Call PropBag.WriteProperty("EmailAddress", m_EmailAddress, m_def_EmailAddress)
' Call PropBag.WriteProperty("Recordset", m_Recordset, Nothing)
Call PropBag.WriteProperty("Recordset", Recordset, Nothing)
End Sub
'注意!不要删除或修改下列被注释的行!
'MemberInfo=13,0,0,0
Public Property Get EmailAddress() As String
EmailAddress = m_EmailAddress
End Property
Public Property Let EmailAddress(ByVal New_EmailAddress As String)
m_EmailAddress = New_EmailAddress
PropertyChanged "EmailAddress"
End Property
''
'
''注意!不要删除或修改下列被注释的行!
''MappingInfo=Adodc1,Adodc1,-1,Recordset
'
'
''注意!不要删除或修改下列被注释的行!
''MemberInfo=30,0,0,0
'Public Property Get Recordset() As Recordset
' Set Recordset = m_Recordset
'End Property
'
'Public Property Set Recordset(ByVal New_Recordset As Recordset)
' Set m_Recordset = New_Recordset
' PropertyChanged "Recordset"
'End Property
'
'注意!不要删除或修改下列被注释的行!
'MappingInfo=Adodc1,Adodc1,-1,Recordset
Public Property Get Recordset() As Recordset
Set Recordset = m_Recordset
End Property
Public Property Set Recordset(ByVal New_Recordset As ADODB.Recordset)
Set m_Recordset = New_Recordset
PropertyChanged "Recordset"
End Property
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -