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

📄 frmlogin1.frm

📁 学校考试成绩分析系统源码
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmLogin1 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "更改权限码"
   ClientHeight    =   2565
   ClientLeft      =   2835
   ClientTop       =   3480
   ClientWidth     =   3750
   Icon            =   "frmLogin1.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1515.487
   ScaleMode       =   0  'User
   ScaleWidth      =   3521.047
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox PASS2 
      Height          =   345
      IMEMode         =   3  'DISABLE
      Left            =   1290
      PasswordChar    =   "*"
      TabIndex        =   6
      Top             =   930
      Width           =   2325
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   750
      Top             =   1470
      Visible         =   0   'False
      Width           =   2325
      _ExtentX        =   4101
      _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          =   345
      Left            =   1290
      TabIndex        =   1
      Top             =   135
      Width           =   2325
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "保存更改"
      Default         =   -1  'True
      Height          =   390
      Left            =   555
      TabIndex        =   4
      Top             =   1830
      Width           =   1140
   End
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      Caption         =   "取消"
      Height          =   390
      Left            =   2160
      TabIndex        =   5
      Top             =   1830
      Width           =   1140
   End
   Begin VB.TextBox txtPassword 
      Height          =   345
      IMEMode         =   3  'DISABLE
      Left            =   1290
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   532
      Width           =   2325
   End
   Begin VB.Label Label1 
      Caption         =   "重复密码:"
      Height          =   315
      Left            =   150
      TabIndex        =   7
      Top             =   990
      Width           =   1035
   End
   Begin VB.Label lblLabels 
      Caption         =   "用户名称(&U):"
      Height          =   315
      Index           =   0
      Left            =   150
      TabIndex        =   0
      Top             =   150
      Width           =   1125
   End
   Begin VB.Label lblLabels 
      Caption         =   "密码(&P):"
      Height          =   315
      Index           =   1
      Left            =   150
      TabIndex        =   2
      Top             =   570
      Width           =   1035
   End
End
Attribute VB_Name = "frmLogin1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdCancel_Click()
Unload Me
End Sub

Private Sub cmdOK_Click()
On Error Resume Next
If Trim(txtUserName.Text) = "" Or Trim(txtPassword.Text) = "" Then
 MsgBox "用户和密码都不可为空!"
 txtUserName.SetFocus
 ElseIf Trim(txtPassword.Text) = Trim(PASS2.Text) Then
     Adodc1.Recordset.Fields(1).Value = txtUserName.Text
     Adodc1.Recordset.Fields(2).Value = txtPassword.Text
     Adodc1.Recordset.Update
     Unload Me
 Else
  MsgBox "重复确认密码错误!"
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
txtPassword.Text = Adodc1.Recordset.Fields(2).Value
End Sub

⌨️ 快捷键说明

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