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

📄 用户登陆.frm

📁 这是一个基于VB开发的程序,实现的是对仪器的查找和定期检修,并对检修的设备进行相关处理
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form search 
   BorderStyle     =   0  'None
   Caption         =   "检索"
   ClientHeight    =   3345
   ClientLeft      =   0
   ClientTop       =   -105
   ClientWidth     =   3660
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3345
   ScaleWidth      =   3660
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command1 
      BackColor       =   &H00FFFF80&
      Caption         =   "确定"
      Default         =   -1  'True
      Height          =   350
      Left            =   840
      MaskColor       =   &H8000000F&
      Picture         =   "用户登陆.frx":0000
      Style           =   1  'Graphical
      TabIndex        =   9
      Top             =   2280
      Width           =   765
   End
   Begin VB.CommandButton cancle 
      BackColor       =   &H00FFFF80&
      Caption         =   "退出"
      Height          =   350
      Left            =   1920
      MaskColor       =   &H8000000F&
      Picture         =   "用户登陆.frx":1FDE2
      Style           =   1  'Graphical
      TabIndex        =   8
      Top             =   2280
      Width           =   765
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   840
      Top             =   2760
      Visible         =   0   'False
      Width           =   1815
      _ExtentX        =   3201
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\wangyufei\VB编程\050305\登陆.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\wangyufei\VB编程\050305\登陆.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "表1"
      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 Text2 
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   1560
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   1680
      Width           =   1575
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1560
      TabIndex        =   2
      Top             =   1200
      Width           =   1575
   End
   Begin VB.TextBox Text3 
      DataField       =   "编号"
      DataSource      =   "Adodc1"
      Height          =   270
      Left            =   1920
      TabIndex        =   4
      Text            =   "Text3"
      Top             =   2280
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "  用户登陆"
      ForeColor       =   &H8000000D&
      Height          =   495
      Left            =   960
      TabIndex        =   7
      Top             =   840
      Width           =   1215
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "用户名:"
      ForeColor       =   &H8000000D&
      Height          =   375
      Left            =   480
      TabIndex        =   6
      Top             =   1260
      Width           =   855
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "密码:"
      ForeColor       =   &H8000000D&
      Height          =   375
      Left            =   600
      TabIndex        =   5
      Top             =   1740
      Width           =   855
   End
   Begin VB.Image Image1 
      Height          =   3390
      Left            =   0
      Picture         =   "用户登陆.frx":3FBC4
      Top             =   0
      Width           =   3660
   End
   Begin VB.Label lblLabels 
      Caption         =   "密码(&P):"
      Height          =   270
      Index           =   1
      Left            =   360
      TabIndex        =   1
      Top             =   840
      Width           =   1080
   End
   Begin VB.Label lblLabels 
      Caption         =   "用户名称(&U):"
      Height          =   270
      Index           =   0
      Left            =   240
      TabIndex        =   0
      Top             =   240
      Width           =   1080
   End
End
Attribute VB_Name = "search"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim tt As Integer

Private Sub cancle_Click()
Unload Me
End Sub

Private Sub Command1_Click()
If Text1.Text = "" Or Text2.Text = "" Then
MsgBox "用户名或密码不能为空!", vbCritical, "登陆"
Else
tt = 0
Adodc1.Recordset.MoveFirst
Do While Not Adodc1.Recordset.EOF
If Adodc1.Recordset.Fields("usernum") = Text1.Text Then
  If Adodc1.Recordset.Fields("password") = Text2.Text Then
      tt = tt + 1
      Me.Hide
      user = Text1.Text
      password = Text2.Text
       main.Show
       Form1.Show
       End If
       Else
           End If
            Adodc1.Recordset.MoveNext
           Loop
           If tt = 0 Then
           'Text1.Text = ""
           Text2.Text = ""
           MsgBox "登陆失败!", vbCritical, "登陆"
           End If
End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
End Sub

⌨️ 快捷键说明

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