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

📄 form1.frm

📁 工资认证管理系统。用于企业的工资制度管理及认证。
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form Form1 
   Caption         =   "用户注册                               "
   ClientHeight    =   6060
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7965
   LinkTopic       =   "Form1"
   ScaleHeight     =   6060
   ScaleWidth      =   7965
   StartUpPosition =   3  '窗口缺省
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   120
      Top             =   5520
      Width           =   1920
      _ExtentX        =   3387
      _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.CommandButton Command3 
      Caption         =   "退出注册"
      Height          =   375
      Left            =   4800
      TabIndex        =   18
      Top             =   5520
      Width           =   1215
   End
   Begin VB.CommandButton Command2 
      Caption         =   "重写"
      Height          =   375
      Left            =   3360
      TabIndex        =   17
      Top             =   5520
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "注册"
      Height          =   375
      Left            =   1920
      TabIndex        =   16
      Top             =   5520
      Width           =   1095
   End
   Begin VB.Frame Frame2 
      Caption         =   "工作信息:"
      Height          =   2895
      Left            =   120
      TabIndex        =   9
      Top             =   2520
      Width           =   7695
      Begin VB.ComboBox Combo2 
         Height          =   300
         Left            =   1320
         TabIndex        =   32
         Text            =   "Combo2"
         Top             =   960
         Width           =   1215
      End
      Begin VB.TextBox Text7 
         Height          =   375
         Left            =   1320
         TabIndex        =   31
         Text            =   "Text7"
         Top             =   360
         Width           =   1215
      End
      Begin VB.TextBox Text10 
         Height          =   1095
         Left            =   1320
         MultiLine       =   -1  'True
         ScrollBars      =   3  'Both
         TabIndex        =   27
         Text            =   "Form1.frx":0000
         Top             =   1560
         Width           =   5895
      End
      Begin VB.TextBox Text9 
         Height          =   375
         Left            =   6000
         TabIndex        =   26
         Text            =   "Text9"
         Top             =   360
         Width           =   975
      End
      Begin VB.TextBox Text8 
         Height          =   375
         Left            =   3600
         TabIndex        =   25
         Text            =   "Text8"
         Top             =   360
         Width           =   1335
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "(年)"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   7.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   150
         Left            =   7080
         TabIndex        =   28
         Top             =   600
         Width           =   300
      End
      Begin VB.Label Label10 
         AutoSize        =   -1  'True
         Caption         =   "所属部门:"
         Height          =   180
         Left            =   360
         TabIndex        =   14
         Top             =   480
         Width           =   900
      End
      Begin VB.Label Label11 
         AutoSize        =   -1  'True
         Caption         =   "职务:"
         Height          =   180
         Left            =   3000
         TabIndex        =   13
         Top             =   480
         Width           =   540
      End
      Begin VB.Label Label12 
         AutoSize        =   -1  'True
         Caption         =   "工龄:"
         Height          =   180
         Left            =   5400
         TabIndex        =   12
         Top             =   480
         Width           =   540
      End
      Begin VB.Label Label14 
         AutoSize        =   -1  'True
         Caption         =   "权限:"
         Height          =   180
         Left            =   720
         TabIndex        =   11
         Top             =   1080
         Width           =   540
      End
      Begin VB.Label Label15 
         AutoSize        =   -1  'True
         Caption         =   "备注:"
         Height          =   180
         Left            =   720
         TabIndex        =   10
         Top             =   1680
         Width           =   540
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "基本信息填写"
      Height          =   2295
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   7695
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   6000
         TabIndex        =   33
         Text            =   "Combo1"
         Top             =   240
         Width           =   1215
      End
      Begin MSComCtl2.DTPicker DTPicker1 
         Height          =   375
         Left            =   6000
         TabIndex        =   24
         Top             =   840
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   661
         _Version        =   393216
         Format          =   25493505
         CurrentDate     =   39438
      End
      Begin VB.TextBox Text6 
         Height          =   375
         Left            =   3600
         TabIndex        =   23
         Text            =   "Text6"
         Top             =   1440
         Width           =   1095
      End
      Begin VB.TextBox Text5 
         Height          =   375
         Left            =   1320
         TabIndex        =   22
         Text            =   "Text5"
         Top             =   1440
         Width           =   1095
      End
      Begin VB.TextBox Text4 
         Height          =   375
         Left            =   3600
         TabIndex        =   21
         Text            =   "Text4"
         Top             =   840
         Width           =   1095
      End
      Begin VB.TextBox Text3 
         Height          =   375
         Left            =   1320
         TabIndex        =   20
         Text            =   "Text3"
         Top             =   840
         Width           =   1095
      End
      Begin VB.TextBox Text2 
         Height          =   375
         Left            =   3600
         TabIndex        =   19
         Text            =   "Text2"
         Top             =   240
         Width           =   1335
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Left            =   1320
         TabIndex        =   15
         Top             =   240
         Width           =   1095
      End
      Begin VB.Label Label16 
         AutoSize        =   -1  'True
         Caption         =   "(6位)"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   7.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   150
         Left            =   2520
         TabIndex        =   30
         Top             =   960
         Width           =   375
      End
      Begin VB.Label Label13 
         AutoSize        =   -1  'True
         Caption         =   "(4位)"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   7.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   150
         Left            =   2520
         TabIndex        =   29
         Top             =   480
         Width           =   375
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "性别:"
         Height          =   180
         Left            =   5400
         TabIndex        =   8
         Top             =   360
         Width           =   540
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "籍贯:"
         Height          =   180
         Left            =   3000
         TabIndex        =   7
         Top             =   960
         Width           =   540
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         Caption         =   "出生年月:"
         Height          =   180
         Left            =   5040
         TabIndex        =   6
         Top             =   960
         Width           =   900
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         Caption         =   "学历:"
         Height          =   180
         Left            =   720
         TabIndex        =   5
         Top             =   1560
         Width           =   540
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         Caption         =   "专业:"
         Height          =   180
         Left            =   3000
         TabIndex        =   4
         Top             =   1560
         Width           =   540
      End
      Begin VB.Label Label9 
         AutoSize        =   -1  'True
         Caption         =   "密码:"
         Height          =   180
         Left            =   720
         TabIndex        =   3
         Top             =   960
         Width           =   540
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "姓名:"
         Height          =   180
         Left            =   3000
         TabIndex        =   2
         Top             =   360
         Width           =   540
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "用户名ID:"
         Height          =   180
         Left            =   360
         TabIndex        =   1
         Top             =   360
         Width           =   900
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Len(Text1.Text) > 4 Or Text1.Text = "" Then
   MsgBox "用户名ID不可以超过4位 AND 用户名ID不可以为NULL"
Else
   If Len(Text3.Text) > 6 Or Text3.Text = "" Then
      MsgBox "密码不可以超过6位 AND 密码不可以为NULL"
   Else
      If Text2.Text = "" Then
         MsgBox "请填写您的姓名"
      Else
        If Combo1.Text = "请选择性别" Or Combo2.Text = "请选择权限" Then
          MsgBox "请选择性别、权限"
          Else
         If MsgBox("是否真的要注册?", vbYesNo, "提示信息") = vbYes Then
            Adodc1.Recordset.AddNew
            DataSave
            Adodc1.Recordset.Update
            Adodc1.Refresh
            MsgBox "注册成功!", , "提示信息"
            If MsgBox("是否要进入登陆页面", vbYesNo) = vbYes Then
               Unload Me
               frmLogin.Show
            End If
            End If
         End If
      End If
   End If
End If
End Sub

Private Sub Command2_Click()
Text1.Text = "": Text2.Text = "": Text3.Text = "": Text4.Text = "": Text5.Text = "": Text6.Text = "": Text7.Text = "": Text8.Text = "": Text9.Text = "": Text10.Text = "": Text11.Text = ""
End Sub

Private Sub Command3_Click()
If MsgBox("是否真的要退出注册?", vbYesNo, "提示信息") = vbYes Then
   Unload Me
   If MsgBox("是否要回到登录页面?", vbYesNo, "提示信息") = vbYes Then
      frmLogin.Show
   End If
End If
End Sub

Private Sub Form_Load()
Text1.Text = "": Text2.Text = "": Text3.Text = "": Text4.Text = "": Text5.Text = "": Text6.Text = "": Text7.Text = "": Text8.Text = "": Text9.Text = "": Text10.Text = ""
Combo1.Text = "请选择性别"
Combo1.AddItem "男"
Combo1.AddItem "女"
Combo2.Text = "请选择权限"
Combo2.AddItem "员工"
Combo2.AddItem "管理员"

Adodc1.Visible = False
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\工资管理系统.mdb;Persist Security Info=False"
Adodc1.RecordSource = "员工信息表"
Adodc1.Refresh
End Sub

Private Sub DataSave()
Adodc1.Recordset("用户名ID") = Text1.Text
Adodc1.Recordset("姓名") = Text2.Text
Adodc1.Recordset("性别") = Combo1.Text
Adodc1.Recordset("密码") = Text3.Text
Adodc1.Recordset("籍贯") = Text4.Text
Adodc1.Recordset("出生年月") = DTPicker1.Value
Adodc1.Recordset("学历") = Text5.Text
Adodc1.Recordset("专业") = Text6.Text
Adodc1.Recordset("所属部门") = Text7.Text
Adodc1.Recordset("职务") = Text8.Text
Adodc1.Recordset("工龄") = Text9.Text
Adodc1.Recordset("权限") = Combo2.Text
Adodc1.Recordset("备注") = Text10.Text
End Sub

⌨️ 快捷键说明

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