www.pudn.com > vb71053453673553.rar > frmLogin.frm


VERSION 5.00 
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX" 
Begin VB.Form frmLogin  
   BorderStyle     =   3  'Fixed Dialog 
   Caption         =   "登录" 
   ClientHeight    =   5070 
   ClientLeft      =   2835 
   ClientTop       =   3480 
   ClientWidth     =   7995 
   Icon            =   "frmLogin.frx":0000 
   LinkTopic       =   "Form1" 
   MaxButton       =   0   'False 
   MinButton       =   0   'False 
   Picture         =   "frmLogin.frx":08CA 
   ScaleHeight     =   2995.523 
   ScaleMode       =   0  'User 
   ScaleWidth      =   7506.872 
   ShowInTaskbar   =   0   'False 
   StartUpPosition =   2  '屏幕中心 
   Begin MSAdodcLib.Adodc Adodc1  
      Height          =   330 
      Left            =   5640 
      Top             =   60 
      Visible         =   0   'False 
      Width           =   2715 
      _ExtentX        =   4789 
      _ExtentY        =   582 
      ConnectMode     =   0 
      CursorLocation  =   3 
      IsolationLevel  =   -1 
      ConnectionTimeout=   15 
      CommandTimeout  =   30 
      CursorType      =   3 
      LockType        =   3 
      CommandType     =   8 
      CursorOptions   =   0 
      CacheSize       =   50 
      MaxRecords      =   0 
      BOFAction       =   0 
      EOFAction       =   0 
      ConnectStringType=   1 
      Appearance      =   1 
      BackColor       =   -2147483643 
      ForeColor       =   -2147483640 
      Orientation     =   0 
      Enabled         =   -1 
      Connect         =   "" 
      OLEDBString     =   "" 
      OLEDBFile       =   "" 
      DataSourceName  =   "" 
      OtherAttributes =   "" 
      UserName        =   "" 
      Password        =   "" 
      RecordSource    =   "" 
      Caption         =   "Adodc1" 
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}  
         Name            =   "宋体" 
         Size            =   9 
         Charset         =   134 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      _Version        =   393216 
   End 
   Begin VB.TextBox txtUserName  
      Height          =   285 
      Left            =   1950 
      Locked          =   -1  'True 
      TabIndex        =   1 
      Top             =   4035 
      Width           =   1275 
   End 
   Begin VB.CommandButton cmdOK  
      Caption         =   "确定" 
      Default         =   -1  'True 
      Height          =   330 
      Left            =   3570 
      TabIndex        =   4 
      Top             =   4020 
      Width           =   810 
   End 
   Begin VB.CommandButton cmdCancel  
      Cancel          =   -1  'True 
      Caption         =   "取消" 
      Height          =   330 
      Left            =   3570 
      TabIndex        =   5 
      Top             =   4500 
      Width           =   810 
   End 
   Begin VB.TextBox txtPassword  
      Height          =   285 
      IMEMode         =   3  'DISABLE 
      Left            =   1950 
      PasswordChar    =   "*" 
      TabIndex        =   3 
      Top             =   4515 
      Width           =   1275 
   End 
   Begin VB.Label Label3  
      BackStyle       =   0  'Transparent 
      Caption         =   "版权:SVSoft 2005" 
      Height          =   285 
      Left            =   5610 
      TabIndex        =   8 
      Top             =   4530 
      Width           =   2265 
   End 
   Begin VB.Label Label2  
      BackStyle       =   0  'Transparent 
      Caption         =   "授权:青岛商业中专" 
      Height          =   315 
      Left            =   5610 
      TabIndex        =   7 
      Top             =   4200 
      Width           =   1935 
   End 
   Begin VB.Label Label1  
      BackStyle       =   0  'Transparent 
      Caption         =   "青岛商业中专 成绩分析系统" 
      BeginProperty Font  
         Name            =   "华文行楷" 
         Size            =   21.75 
         Charset         =   134 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      ForeColor       =   &H00800000& 
      Height          =   405 
      Left            =   360 
      TabIndex        =   6 
      Top             =   1050 
      Width           =   5835 
   End 
   Begin VB.Line Line1  
      DrawMode        =   16  'Merge Pen 
      X1              =   -253.515 
      X2              =   7661.798 
      Y1              =   2197.898 
      Y2              =   2197.898 
   End 
   Begin VB.Label lblLabels  
      BackStyle       =   0  'Transparent 
      Caption         =   "用户(&U):" 
      Height          =   270 
      Index           =   0 
      Left            =   1125 
      TabIndex        =   0 
      Top             =   4050 
      Width           =   810 
   End 
   Begin VB.Label lblLabels  
      BackStyle       =   0  'Transparent 
      Caption         =   "密码(&P):" 
      Height          =   270 
      Index           =   1 
      Left            =   1125 
      TabIndex        =   2 
      Top             =   4530 
      Width           =   810 
   End 
End 
Attribute VB_Name = "frmLogin" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Option Explicit 
Dim pASSWORD1 
Private Sub cmdCancel_Click() 
End 
End Sub 
 
Private Sub cmdOK_Click() 
If txtPassword.Text = pASSWORD1 Then 
   FormClear.Show 
   Unload Me 
Else 
   MsgBox "请勿越权使用!疑问咨询开发商!", vbCritical, "身份验证失败" 
End If 
End Sub 
 
Private Sub Form_Load() 
On Error Resume Next 
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db\SVDB.mdb;Persist Security Info=False" 
Adodc1.RecordSource = "SELECT * FROM admin" 
Adodc1.Refresh 
 
txtUserName.Text = Adodc1.Recordset.Fields(1).Value 
pASSWORD1 = Adodc1.Recordset.Fields(2).Value 
End Sub