www.pudn.com > vb625557712344.rar > FrmLogin.frm, change:2005-06-03,size:6436b


VERSION 5.00 
Begin VB.Form FrmLogin  
   BorderStyle     =   1  'Fixed Single 
   Caption         =   "身份验证" 
   ClientHeight    =   3975 
   ClientLeft      =   45 
   ClientTop       =   330 
   ClientWidth     =   5715 
   ControlBox      =   0   'False 
   LinkTopic       =   "Form1" 
   MaxButton       =   0   'False 
   MouseIcon       =   "FrmLogin.frx":0000 
   Picture         =   "FrmLogin.frx":044A 
   ScaleHeight     =   3975 
   ScaleWidth      =   5715 
   StartUpPosition =   2  '屏幕中心 
   Begin VB.CommandButton Cmd_Cancel  
      BackColor       =   &H80000000& 
      Cancel          =   -1  'True 
      Caption         =   "取 消" 
      BeginProperty Font  
         Name            =   "华文行楷" 
         Size            =   14.25 
         Charset         =   134 
         Weight          =   700 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      Height          =   400 
      Left            =   3360 
      MouseIcon       =   "FrmLogin.frx":E70E 
      MousePointer    =   99  'Custom 
      Style           =   1  'Graphical 
      TabIndex        =   3 
      Top             =   3120 
      Width           =   1300 
   End 
   Begin VB.CommandButton Cmd_Ok  
      BackColor       =   &H80000000& 
      Caption         =   "确 定" 
      Default         =   -1  'True 
      BeginProperty Font  
         Name            =   "华文行楷" 
         Size            =   14.25 
         Charset         =   134 
         Weight          =   700 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      Height          =   400 
      Left            =   1080 
      MouseIcon       =   "FrmLogin.frx":EA18 
      MousePointer    =   99  'Custom 
      Style           =   1  'Graphical 
      TabIndex        =   2 
      Top             =   3120 
      Width           =   1300 
   End 
   Begin VB.Frame Frame1  
      BackColor       =   &H80000001& 
      ForeColor       =   &H8000000A& 
      Height          =   1455 
      Left            =   1080 
      TabIndex        =   4 
      Top             =   1320 
      Width           =   3615 
      Begin VB.TextBox txtPwd  
         BeginProperty Font  
            Name            =   "华文行楷" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   270 
         IMEMode         =   3  'DISABLE 
         Left            =   1080 
         MaxLength       =   20 
         PasswordChar    =   "*" 
         TabIndex        =   1 
         ToolTipText     =   "输入密码,不超过20个字符" 
         Top             =   795 
         Width           =   2175 
      End 
      Begin VB.TextBox txtUser  
         BeginProperty Font  
            Name            =   "楷体_GB2312" 
            Size            =   10.5 
            Charset         =   134 
            Weight          =   700 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   270 
         Left            =   1080 
         MaxLength       =   20 
         TabIndex        =   0 
         ToolTipText     =   "输入用户名,不超过20个字符" 
         Top             =   315 
         Width           =   2175 
      End 
      Begin VB.Label Label1  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "用户名" 
         Height          =   180 
         Index           =   0 
         Left            =   240 
         TabIndex        =   6 
         Top             =   360 
         Width           =   540 
      End 
      Begin VB.Label Label2  
         AutoSize        =   -1  'True 
         BackStyle       =   0  'Transparent 
         Caption         =   "密 码" 
         Height          =   180 
         Left            =   240 
         TabIndex        =   5 
         Top             =   840 
         Width           =   540 
      End 
   End 
   Begin VB.Image Image1  
      Height          =   1140 
      Left            =   3360 
      Picture         =   "FrmLogin.frx":ED22 
      Top             =   0 
      Width           =   2235 
   End 
   Begin VB.Label Label1  
      BackStyle       =   0  'Transparent 
      Caption         =   "汽车租赁管理系统" 
      BeginProperty Font  
         Name            =   "华文行楷" 
         Size            =   24 
         Charset         =   134 
         Weight          =   700 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      Height          =   735 
      Index           =   1 
      Left            =   600 
      TabIndex        =   7 
      Top             =   360 
      Width           =   4815 
   End 
End 
Attribute VB_Name = "FrmLogin" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Public PasswordKey As String 
Public NameKey As String 
Public Try_times As Integer 
 
Private Sub Cmd_Cancel_Click() 
  End 
End Sub 
 
Private Sub Cmd_OK_Click() 
  Dim j As Single 
 
  If txtUser = "" Then 
    MsgBox "请输入用户名" 
    txtUser.SetFocus 
    Exit Sub 
  End If 
  If txtPwd = "" Then 
    MsgBox "请输入密码" 
    txtPwd.SetFocus 
    Exit Sub 
  End If 
  
  NameKey = MakeStr(txtUser) 
  PasswordKey = MakeStr(txtPwd) 
    
  If MyUser.In_DB(NameKey) = False Then 
    MsgBox "用户名不存在" 
    Try_times = Try_times + 1 
    If Try_times >= 3 Then 
      MsgBox "您已经三次尝试进入本系统,均不成功,系统将关闭" 
      DBapi_Disconnect 
      End 
    Else 
      Exit Sub 
    End If 
  End If 
 
  MyUser.GetInfo (NameKey) 
  If MyUser.UserPwd <> PasswordKey Then 
    MsgBox "密码错误" 
    Try_times = Try_times + 1 
    If Try_times >= 3 Then 
      MsgBox "您已经三次尝试进入本系统,均不成功,系统将关闭" 
      DBapi_Disconnect 
      End 
    Else 
      Exit Sub 
    End If 
  End If 
   
  CurUser.GetInfo (MyUser.UserName) 
  Unload Me 
End Sub