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

📄 main_xtgl_czysz.frm

📁 图书综合管理系统 VB毕业设计 原代码+论文
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form main_xtgl_czysz 
   BackColor       =   &H00C0C0C0&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "系统管理-【操作员设置】"
   ClientHeight    =   4050
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5985
   Icon            =   "main_xtgl_czysz.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4050
   ScaleWidth      =   5985
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton CmdAdd 
      BackColor       =   &H00C0C0C0&
      Caption         =   "&A 添加"
      Height          =   375
      Left            =   810
      Style           =   1  'Graphical
      TabIndex        =   9
      Top             =   3630
      Width           =   1080
   End
   Begin VB.CommandButton CmdCancel 
      BackColor       =   &H00C0C0C0&
      Caption         =   "&C 取消"
      Height          =   375
      Left            =   2970
      Style           =   1  'Graphical
      TabIndex        =   7
      Top             =   3630
      Width           =   1080
   End
   Begin VB.CommandButton CmdOk 
      BackColor       =   &H00C0C0C0&
      Caption         =   "&O 确定"
      Height          =   375
      Left            =   1890
      Style           =   1  'Graphical
      TabIndex        =   6
      Top             =   3630
      Width           =   1080
   End
   Begin VB.CommandButton CmdEnd 
      BackColor       =   &H00C0C0C0&
      Caption         =   "&E 退出"
      Height          =   375
      Left            =   4050
      Style           =   1  'Graphical
      TabIndex        =   5
      Top             =   3630
      Width           =   1080
   End
   Begin VB.Frame Frame1 
      Height          =   3480
      Left            =   120
      TabIndex        =   0
      Top             =   75
      Width           =   5745
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   2700
         TabIndex        =   11
         Top             =   2400
         Width           =   2820
      End
      Begin VB.TextBox TxtBH 
         BackColor       =   &H00FFFFFF&
         Height          =   330
         Left            =   2700
         Locked          =   -1  'True
         TabIndex        =   8
         Top             =   285
         Width           =   2820
      End
      Begin VB.TextBox TxtCZY 
         BackColor       =   &H00FFFFFF&
         Height          =   330
         Left            =   2700
         TabIndex        =   3
         Top             =   810
         Width           =   2820
      End
      Begin VB.TextBox TxtMM 
         BackColor       =   &H00FFFFFF&
         Height          =   330
         IMEMode         =   3  'DISABLE
         Left            =   2700
         MaxLength       =   6
         TabIndex        =   2
         Top             =   1335
         Width           =   2820
      End
      Begin VB.TextBox TxtOk 
         BackColor       =   &H00FFFFFF&
         Height          =   330
         IMEMode         =   3  'DISABLE
         Left            =   2700
         MaxLength       =   6
         PasswordChar    =   "*"
         TabIndex        =   1
         Top             =   1875
         Width           =   2820
      End
      Begin MSComctlLib.ImageList ImageList1 
         Left            =   -60
         Top             =   3045
         _ExtentX        =   1005
         _ExtentY        =   1005
         BackColor       =   -2147483643
         ImageWidth      =   16
         ImageHeight     =   16
         MaskColor       =   12632256
         _Version        =   393216
         BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
            NumListImages   =   10
            BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "main_xtgl_czysz.frx":000C
               Key             =   "头像1"
            EndProperty
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "main_xtgl_czysz.frx":0EE8
               Key             =   "头像2"
            EndProperty
            BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "main_xtgl_czysz.frx":17C4
               Key             =   "头像3"
            EndProperty
            BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "main_xtgl_czysz.frx":20A0
               Key             =   "头像4"
            EndProperty
            BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "main_xtgl_czysz.frx":23BC
               Key             =   "头像5"
            EndProperty
            BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "main_xtgl_czysz.frx":2C98
               Key             =   "头像6"
            EndProperty
            BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "main_xtgl_czysz.frx":3574
               Key             =   "头像7"
            EndProperty
            BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "main_xtgl_czysz.frx":3E50
               Key             =   "头像8"
            EndProperty
            BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "main_xtgl_czysz.frx":472C
               Key             =   "头像9"
            EndProperty
            BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "main_xtgl_czysz.frx":5008
               Key             =   "头像10"
            EndProperty
         EndProperty
      End
      Begin MSComctlLib.ImageCombo ImageCombo1 
         Height          =   330
         Left            =   2700
         TabIndex        =   10
         Top             =   2940
         Width           =   2820
         _ExtentX        =   4974
         _ExtentY        =   582
         _Version        =   393216
         ForeColor       =   -2147483640
         BackColor       =   -2147483643
         ImageList       =   "ImageList1"
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "级别设置                                     头像设置                     "
         Height          =   1380
         Left            =   1845
         TabIndex        =   12
         Top             =   2460
         Width           =   1290
      End
      Begin VB.Image Image1 
         Height          =   3180
         Left            =   135
         Picture         =   "main_xtgl_czysz.frx":5328
         Stretch         =   -1  'True
         Top             =   165
         Width           =   1515
      End
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   "编    号                             操作员                             密    码                            确    认"
         Height          =   1875
         Left            =   1845
         TabIndex        =   4
         Top             =   360
         Width           =   1005
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   0
      Top             =   0
      Visible         =   0   'False
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   3
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "DSN=NBooks"
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   "NBooks"
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from qxb"
      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
End
Attribute VB_Name = "main_xtgl_czysz"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
 Dim NewItem As ComboItem     '声明一个ComboItem对象
 Dim i As Integer     '声明一个整型变量
 Combo1.AddItem ("系统管理员")
 Combo1.AddItem ("高级操作员")
 Combo1.AddItem ("普通操作员")
 For i = 1 To 10
     Set NewItem = ImageCombo1.ComboItems.Add(i, "头像" & i, "头像" & i, "头像" & i)
 Next i
End Sub
Private Sub Form_Unload(Cancel As Integer)
 frm_main.Enabled = True
End Sub
Private Sub TxtBH_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = vbKeyReturn Then TxtBH.SetFocus     '回车TxtBH获得焦点
End Sub
Private Sub TxtCZY_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = vbKeyReturn Then TxtMM.SetFocus     '回车TxtMM获得焦点
End Sub
Private Sub TxtMM_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = vbKeyReturn Then TxtOk.SetFocus     '回车TxtOk获得焦点
End Sub
Private Sub TxtOk_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = vbKeyReturn Then Combo1.SetFocus     '回车Combo1获得焦点
End Sub
Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = vbKeyReturn Then ImageCombo1.SetFocus
End Sub
Private Sub ImageCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = vbKeyReturn Then CmdOk.SetFocus
End Sub
Private Sub CmdAdd_Click()
 Adodc1.RecordSource = "select * from qxb"
 Adodc1.Refresh
 If Adodc1.Recordset.RecordCount > 0 Then
    Adodc1.Recordset.MoveLast
    TxtBH.text = Format(Val(Adodc1.Recordset.Fields("编号")) + 1, "00")
  Else
    TxtBH.text = "01"
 End If
 TxtCZY.SetFocus
End Sub
Private Sub cmdOK_Click()
 '保存操作员及密码
  If TxtCZY.text = "" Then
     MsgBox "系统不允许操作员为空!"
     Exit Sub
  End If
  If TxtMM.text = "" Then
     MsgBox "密码不允许为空!"
     Exit Sub
  End If
  If TxtOk.text = "" Then
     MsgBox "确认密码不允许为空!"
     Exit Sub
  End If
  If TxtOk.text <> TxtMM.text Then
     MsgBox "密码与确认密码不同,请重新输入!"
     Exit Sub
  End If
  If Combo1.text = "" Then
     MsgBox "操作员级别不允许为空!"
     Exit Sub
  End If
  If ImageCombo1.text = "" Then
     MsgBox "操作员头像不允许为空!"
     Exit Sub
  End If
  Adodc1.RecordSource = "select * from qxb where 操作员级别='" + Combo1.text + "'"
  Adodc1.Refresh
  If Adodc1.Recordset.RecordCount > 0 Then
     If ImageCombo1.text <> Adodc1.Recordset.Fields("头像") Then
        MsgBox ("此级别的操作员头像应为【" & Adodc1.Recordset.Fields("头像") & "】,请更改!")
     Exit Sub
     End If
  End If
  Adodc1.RecordSource = "select * from qxb where 操作员='" + TxtCZY.text + "'"
  Adodc1.Refresh
  With Adodc1.Recordset
       If .RecordCount > 0 Then
          MsgBox "此操作员已存在,请重新输入!"
        Else
          .AddNew
          .Fields("编号") = TxtBH.text
          .Fields("操作员") = TxtCZY.text
          .Fields("密码") = TxtMM.text
          .Fields("操作员级别") = Combo1.text
          .Fields("头像") = ImageCombo1.text
          .Update     '更新记录
          TxtBH.text = ""
          TxtCZY.text = ""
          TxtMM.text = ""
          TxtOk.text = ""
          Combo1.text = ""
          ImageCombo1.text = ""
       End If
  End With
End Sub
Private Sub CmdCancel_Click()
 TxtBH.text = ""
 TxtCZY.text = ""
 TxtMM.text = ""
 TxtOk.text = ""
 Combo1.text = ""
 ImageCombo1.text = ""
End Sub
Private Sub CmdEnd_Click()
 frm_main.Enabled = True
 Unload Me
End Sub

⌨️ 快捷键说明

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