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

📄 form3.frm

📁 设备管理系统,对设备的入库,出库,借出与归还的管理
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form3 
   BackColor       =   &H00C0C0FF&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "新用户注册"
   ClientHeight    =   3795
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5265
   LinkTopic       =   "Form3"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3795
   ScaleWidth      =   5265
   StartUpPosition =   3  '窗口缺省
   Begin VB.CheckBox Check5 
      Caption         =   "Check5"
      Height          =   375
      Left            =   7665
      TabIndex        =   12
      Top             =   6495
      Width           =   765
   End
   Begin VB.CheckBox Check4 
      Caption         =   "Check4"
      Height          =   495
      Left            =   6180
      TabIndex        =   11
      Top             =   6225
      Width           =   1215
   End
   Begin VB.CheckBox Check3 
      Caption         =   "Check3"
      Height          =   495
      Left            =   3930
      TabIndex        =   10
      Top             =   6300
      Width           =   1215
   End
   Begin VB.CheckBox Check2 
      Caption         =   "Check2"
      Height          =   495
      Left            =   2280
      TabIndex        =   9
      Top             =   6315
      Width           =   1215
   End
   Begin VB.CheckBox Check1 
      Caption         =   "Check1"
      Height          =   495
      Left            =   600
      TabIndex        =   8
      Top             =   6390
      Width           =   1215
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   510
      Left            =   840
      Top             =   4815
      Width           =   3165
      _ExtentX        =   5583
      _ExtentY        =   900
      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         =   "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=test;Data Source=(local)"
      OLEDBString     =   "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=test;Data Source=(local)"
      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 Text3 
      BackColor       =   &H00C0FFC0&
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   405
      IMEMode         =   3  'DISABLE
      Left            =   2445
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   2115
      Width           =   1920
   End
   Begin VB.CommandButton Command2 
      BackColor       =   &H00FFFFC0&
      Cancel          =   -1  'True
      Caption         =   "返回(&E)"
      Height          =   450
      Left            =   3135
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   2820
      Width           =   1110
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00FFFFC0&
      Caption         =   "确认(&A)"
      Default         =   -1  'True
      Height          =   450
      Left            =   960
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   2820
      Width           =   1110
   End
   Begin VB.TextBox Text2 
      BackColor       =   &H00C0FFC0&
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   405
      IMEMode         =   3  'DISABLE
      Left            =   2445
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   1515
      Width           =   1920
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H00C0FFC0&
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   360
      Left            =   2445
      TabIndex        =   0
      Top             =   810
      Width           =   1920
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "在注册新用户后,请为其分配相应权限!"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   345
      Left            =   435
      TabIndex        =   13
      Top             =   285
      Width           =   4710
   End
   Begin VB.Label Label3 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "确认密码:"
      Height          =   255
      Left            =   480
      TabIndex        =   7
      Top             =   2250
      Width           =   1410
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "密码:"
      Height          =   255
      Left            =   600
      TabIndex        =   6
      Top             =   1695
      Width           =   1050
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "用户帐号:"
      Height          =   255
      Left            =   480
      TabIndex        =   5
      Top             =   900
      Width           =   1410
   End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i As Integer
Private Sub Command1_Click()
Call main
  If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Then
  MsgBox "输入不完全!!", 48, "用户管理系统"
  Else
         
          If Text2.Text = Text3.Text Then '''''''''''''''''''''''''接下来的只能是'" & Text1 & "',不能是""否则将不接受前面的0....................
          Set adoRs = adoCon.Execute("insert into Table1_user values('" & Text1 & "','" & Text2 & "','" & Check1 & "','" & Check2 & "','" & Check3 & "','" & Check4 & "','" & Check5 & "')")
          MsgBox "注册成功!!", 48, "用户管理系统"

          Text1.Text = ""
          Text2.Text = ""
          Text3.Text = ""
          Form3.Hide
          Else
          MsgBox "两次输入的密码不一致,请您确认后重新输入", 48, "用户管理系统"
          Text2.Text = ""
          Text3.Text = ""
          Text2.SetFocus
          End If
  
  End If
adoCon.Close
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
End Sub

Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text2.SetFocus
Else
End If
End Sub

Private Sub Text1_LostFocus() '能在用户刚输完帐号时便即时做出判断
Adodc1.RecordSource = "select * from Table1_user where 帐号='" & Text1.Text & "'"
 Adodc1.Refresh
  If Adodc1.Recordset.RecordCount > 0 Then
    MsgBox "输入的帐号已存在,请重新输入!!", 48, "用户管理系统"
    Text1.Text = ""
    Text1.SetFocus
  Else
  End If
   
End Sub

Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text3.SetFocus
Else
End If
End Sub

Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call Command1_Click
Else
End If
End Sub

⌨️ 快捷键说明

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