⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmhyperlink.frm

📁 为个人用户开发的车险秘书系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmConfig 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Mail发送系统配置"
   ClientHeight    =   3360
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4905
   ClipControls    =   0   'False
   Icon            =   "frmHyperlink.frx":0000
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3360
   ScaleWidth      =   4905
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.TextBox txtServPort 
      Height          =   285
      Left            =   225
      TabIndex        =   2
      Top             =   1620
      Width           =   780
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消(&C)"
      Height          =   350
      Left            =   2295
      TabIndex        =   7
      TabStop         =   0   'False
      Top             =   2805
      Width           =   990
   End
   Begin VB.CommandButton cmdReset 
      Caption         =   "复位(&R)"
      Height          =   350
      Left            =   1245
      TabIndex        =   6
      TabStop         =   0   'False
      Top             =   2805
      Width           =   990
   End
   Begin VB.CommandButton cmdOk 
      Caption         =   "确定(&O)"
      Height          =   350
      Left            =   180
      TabIndex        =   5
      TabStop         =   0   'False
      Top             =   2805
      Width           =   990
   End
   Begin VB.TextBox txtMailName 
      Height          =   285
      Left            =   225
      TabIndex        =   3
      Top             =   2295
      Width           =   3090
   End
   Begin VB.TextBox txtServName 
      Height          =   285
      Left            =   240
      TabIndex        =   1
      Top             =   930
      Width           =   4350
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "SMTP 服务器端口号:(默认25)"
      Height          =   180
      Left            =   240
      TabIndex        =   8
      Top             =   1350
      Width           =   2340
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "发件人信箱:(如mndsoft@126.com)"
      Height          =   180
      Left            =   240
      TabIndex        =   4
      Top             =   2040
      Width           =   2700
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "SMTP 服务器地址:"
      Height          =   180
      Left            =   240
      TabIndex        =   0
      Top             =   690
      Width           =   1440
   End
   Begin VB.Image Image1 
      Height          =   480
      Left            =   150
      Picture         =   "frmHyperlink.frx":0442
      Top             =   75
      Width           =   480
   End
End
Attribute VB_Name = "frmConfig"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()
    If FirstTimeLoad Then
        Ans = MsgBox("你没有做任何设置现在就退出吗?", _
        vbYesNo Or vbInformation)
        If Ans = vbNo Then
            Exit Sub
        Else
            Unload frmConfig
            Unload frmMailSender
            Set frmConfig = Nothing
            Set frmMailSender = Nothing
            End
        End If
    Else
        Unload frmConfig
        Set frmConfig = Nothing
        frmMailSender.Show
    End If
    
End Sub

Private Sub cmdOk_Click()
    If Len(Trim(txtServName.Text)) <= 0 Then
        MsgBox "SMTP 服务器名称错误.", vbCritical, "错误"
        Exit Sub
    ElseIf IsNumeric(txtServPort.Text) = False Then
        MsgBox "错误端口号", vbCritical, "错误"
        Exit Sub
    ElseIf Len(Trim(txtMailName.Text)) <= 0 Then
        MsgBox "发件人地址也要输入", vbInformation, "错误"
        Exit Sub
    ElseIf isVaildEmail(txtMailName) = False Then
        MsgBox "错误的E-Mail地址", vbCritical, "错误"
        Exit Sub
    Else
        WritePrivateProfileString "DM-EASYMAIL", "Servername", txtServName.Text, AddBackSlash(App.Path) & "config.ini"
        WritePrivateProfileString "DM-EASYMAIL", "Serverport", txtServPort.Text, AddBackSlash(App.Path) & "config.ini"
        WritePrivateProfileString "DM-EASYMAIL", "Mailtext", txtMailName.Text, AddBackSlash(App.Path) & "config.ini"
        MsgBox "当前设置需要下次启动时才能有效", vbInformation, "完成"
        Unload frmConfig
        
    End If
    
End Sub

Private Sub cmdReset_Click()
    txtServName = ""
    txtServPort = ""
    txtMailName = ""
    
End Sub

Private Sub Form_Load()
    txtMailName.Text = TMail.MailFrom
    txtServName.Text = TMail.MailServer
    txtServPort.Text = TMail.MailServerPort
    
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Set frmConfig = Nothing
    
End Sub

Private Sub txtMailName_GotFocus()
    txtMailName.BackColor = 14073525
    
End Sub

Private Sub txtMailName_LostFocus()
    txtMailName.BackColor = vbWhite
    
End Sub

Private Sub txtServName_GotFocus()
    txtServName.BackColor = 14073525
 
End Sub

Private Sub txtServName_LostFocus()
    txtServName.BackColor = vbWhite
    
End Sub

Private Sub txtServPort_GotFocus()
     txtServPort.BackColor = 14073525
     
End Sub

Private Sub txtServPort_LostFocus()
    txtServPort.BackColor = vbWhite
    
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -