www.pudn.com > textmanager.rar > FrmMiMa.frm, change:2005-04-12,size:7139b


VERSION 5.00 
Begin VB.Form FrmMiMa  
   BorderStyle     =   3  'Fixed Dialog 
   Caption         =   "修改密码" 
   ClientHeight    =   2835 
   ClientLeft      =   45 
   ClientTop       =   330 
   ClientWidth     =   4275 
   LinkTopic       =   "Form1" 
   LockControls    =   -1  'True 
   MaxButton       =   0   'False 
   MinButton       =   0   'False 
   ScaleHeight     =   2835 
   ScaleWidth      =   4275 
   ShowInTaskbar   =   0   'False 
   StartUpPosition =   1  '所有者中心 
   Begin VB.Frame Frame1  
      Height          =   2745 
      Left            =   30 
      TabIndex        =   0 
      Top             =   30 
      Width           =   4215 
      Begin VB.CommandButton Command2  
         Cancel          =   -1  'True 
         Caption         =   "关闭" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   375 
         Left            =   3060 
         TabIndex        =   8 
         Top             =   2100 
         Width           =   945 
      End 
      Begin VB.CommandButton Command1  
         Caption         =   "保存" 
         Default         =   -1  'True 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   375 
         Left            =   1860 
         TabIndex        =   7 
         Top             =   2100 
         Width           =   945 
      End 
      Begin VB.TextBox TxTNewPassQ  
         Appearance      =   0  'Flat 
         BackColor       =   &H00E8F4F8& 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   315 
         IMEMode         =   3  'DISABLE 
         Left            =   1440 
         PasswordChar    =   "*" 
         TabIndex        =   6 
         Top             =   1410 
         Width           =   1785 
      End 
      Begin VB.TextBox TXTNewPass  
         Appearance      =   0  'Flat 
         BackColor       =   &H00E8F4F8& 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   315 
         IMEMode         =   3  'DISABLE 
         Left            =   1440 
         PasswordChar    =   "*" 
         TabIndex        =   4 
         Top             =   840 
         Width           =   1785 
      End 
      Begin VB.TextBox TxToldPass  
         Appearance      =   0  'Flat 
         BackColor       =   &H00E8F4F8& 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   315 
         IMEMode         =   3  'DISABLE 
         Left            =   1440 
         PasswordChar    =   "*" 
         TabIndex        =   2 
         Top             =   300 
         Width           =   1785 
      End 
      Begin VB.Label Label1  
         AutoSize        =   -1  'True 
         Caption         =   "确认新密码:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   210 
         Index           =   2 
         Left            =   270 
         TabIndex        =   5 
         Top             =   1470 
         Width           =   1260 
      End 
      Begin VB.Label Label1  
         AutoSize        =   -1  'True 
         Caption         =   "输入新密码:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   210 
         Index           =   1 
         Left            =   270 
         TabIndex        =   3 
         Top             =   900 
         Width           =   1260 
      End 
      Begin VB.Label Label1  
         AutoSize        =   -1  'True 
         Caption         =   "输入旧密码:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   240 
         Index           =   0 
         Left            =   270 
         TabIndex        =   1 
         Top             =   360 
         Width           =   1260 
      End 
   End 
End 
Attribute VB_Name = "FrmMiMa" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Private Sub Command1_Click() 
 On Error GoTo myerr 
 If TxToldPass <> UserPass Then 
   MsgBox "对不起,你输入的密码错误!" 
   TxToldPass.SetFocus 
   SendKeys "{Home}+{End}" 
   Exit Sub 
 End If 
 If TXTNewPass.Text <> TxTNewPassQ.Text Then 
   MsgBox "对不起,你两次输入的新密码不相同,请重输!" 
   TXTNewPass.SetFocus 
   SendKeys "{Home}+{End}" 
   Exit Sub 
 End If 
 If TXTNewPass.Text = "" Then 
   If MsgBox("你输入的新密码为空,你确定用空密码吗?", vbYesNo, "提问?") = vbNo Then 
    TXTNewPass.SetFocus 
    Exit Sub 
   End If 
 End If 
 '修改密码 
 Dim sql As String 
 sql = "update admin set pass='" + TXTNewPass.Text + "' where code='" + UseCode + "'" 
 DB.Execute sql 
 MsgBox "已经成功的修改了密码,请牢记新密码!" 
 UserPass = TXTNewPass.Text 
 Exit Sub 
myerr: 
  MsgBox "密码里面不能包含非法字符" + "'" + "!" 
End Sub 
 
Private Sub Command2_Click() 
 Unload Me 
End Sub