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

📄 frmmanager_regedit.frm

📁 以前上传过的一个图书馆管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Frmmanager_regedit 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "管理员注册"
   ClientHeight    =   4125
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5265
   Icon            =   "Frmmanager_regedit.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4125
   ScaleWidth      =   5265
   StartUpPosition =   1  '所有者中心
   Tag             =   "regedit"
   Begin VB.CommandButton Cmd_manager_check 
      Caption         =   "确认(&O)"
      Default         =   -1  'True
      Height          =   375
      Left            =   3960
      TabIndex        =   13
      Tag             =   "regedit"
      Top             =   3000
      Width           =   1095
   End
   Begin VB.CommandButton Cmd_exit 
      Caption         =   "退出(&E)"
      Height          =   375
      Left            =   3960
      TabIndex        =   12
      Top             =   3600
      Width           =   1095
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   4320
      Top             =   2400
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.Frame Frame2 
      Caption         =   "权限"
      Height          =   1215
      Left            =   120
      TabIndex        =   6
      Top             =   2760
      Width           =   3615
      Begin VB.CheckBox Chk_Mbook 
         Caption         =   "图书信息管理"
         Height          =   375
         Left            =   1800
         TabIndex        =   1
         Top             =   480
         Width           =   1455
      End
      Begin VB.CheckBox Chk_Muser 
         Caption         =   "读者信息管理"
         Height          =   375
         Left            =   240
         TabIndex        =   0
         Top             =   480
         Width           =   1455
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "基本信息"
      Height          =   2535
      Left            =   120
      TabIndex        =   2
      Top             =   120
      Width           =   3615
      Begin VB.TextBox Txt_Mid 
         Height          =   375
         Left            =   1320
         MaxLength       =   10
         TabIndex        =   11
         Text            =   "txt_Mid"
         Top             =   480
         Width           =   2055
      End
      Begin VB.TextBox Txt_Mname 
         Height          =   375
         Left            =   1320
         MaxLength       =   10
         TabIndex        =   10
         Text            =   "txt_Mname"
         Top             =   960
         Width           =   2055
      End
      Begin VB.TextBox Txt_Mpass 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Index           =   0
         Left            =   1320
         MaxLength       =   10
         PasswordChar    =   "*"
         TabIndex        =   9
         Text            =   "Txt_Mpass"
         Top             =   1440
         Width           =   2055
      End
      Begin VB.TextBox Txt_Mpass 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Index           =   1
         Left            =   1320
         MaxLength       =   10
         PasswordChar    =   "*"
         TabIndex        =   8
         Text            =   "Txt_Mpass"
         Top             =   1920
         Width           =   2055
      End
      Begin VB.Label Label5 
         Caption         =   "复核密码"
         Height          =   255
         Left            =   240
         TabIndex        =   7
         Top             =   1920
         Width           =   855
      End
      Begin VB.Label Label3 
         Caption         =   "密    码"
         Height          =   255
         Left            =   240
         TabIndex        =   5
         Top             =   1440
         Width           =   855
      End
      Begin VB.Label Label2 
         Caption         =   "管理员名"
         Height          =   375
         Left            =   240
         TabIndex        =   4
         Top             =   960
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "管理员ID"
         Height          =   375
         Left            =   240
         TabIndex        =   3
         Top             =   480
         Width           =   855
      End
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Height          =   375
      Left            =   4200
      TabIndex        =   15
      Top             =   0
      Width           =   855
   End
   Begin VB.Image image_Mphoto 
      Appearance      =   0  'Flat
      BorderStyle     =   1  'Fixed Single
      Height          =   1695
      Left            =   3840
      Picture         =   "Frmmanager_regedit.frx":08CA
      Stretch         =   -1  'True
      ToolTipText     =   "左键点击图片添加相片,右键点击图片删除相片"
      Top             =   240
      Width           =   1335
   End
   Begin VB.Label lbl_delphoto 
      BackStyle       =   0  'Transparent
      Caption         =   "删除相片"
      Height          =   255
      Left            =   4200
      TabIndex        =   14
      Top             =   2040
      Width           =   735
   End
End
Attribute VB_Name = "Frmmanager_regedit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Cmd_manager_check_Click() '确定
If Txt_Mid = "" Then: MsgBox "请输入管理员ID": Txt_Mid.SetFocus: Exit Sub
If Txt_Mname = "" Then: MsgBox "请输入管理员名": Txt_Mname.SetFocus: Exit Sub
If Txt_Mpass(0) = "" Then: MsgBox "请输入密码": Txt_Mpass(0).SetFocus: Exit Sub
If Txt_Mpass(0) <> Txt_Mpass(1) Then MsgBox "密码与复核密码不匹配,请重新输入": Txt_Mpass(0).SetFocus: Txt_Mpass(0).SelStart = 0: Txt_Mpass(0).SelLength = (Len(Txt_Mpass(0))): Exit Sub

With rds_manager
If .State = adStateOpen Then .Close
.Open "select * from 管理员 where MANAGER_ID='" + Txt_Mid + "'", Module1.myconn, adOpenKeyset, adLockOptimistic, 1
If Me.Tag = "regedit" Then '注册新管理员
    If .Fields("MANAGER_ID") <> "" Then
        MsgBox "该管理员ID已存在,请重新输入"
        Txt_Mid.SetFocus
        .Close
        Exit Sub
    End If
    .Close
    .Open "管理员", Module1.myconn, adOpenKeyset, adLockOptimistic, adCmdTable
    .AddNew
ElseIf Me.Tag = "modify" Then '修改管理员
End If
.Update "MANAGER_ID", Txt_Mid
.Update "MANAGER_NAME", Txt_Mname
.Update "MANAGER_PASS", Txt_Mpass(0)
.Update "MANAGER_USER", Chk_Muser.Value
.Update "MANAGER_BOOK", Chk_Mbook.Value
.Update "MANAGER_PHOTO", CommonDialog1.FileName
.Close
End With
MsgBox "添加成功"
Unload Me
End Sub

Private Sub Cmd_exit_Click()
Unload Me
End Sub

Private Sub Form_Activate()
If Me.Tag = "regedit" Then
Txt_Mid = "" 'M=manager
Txt_Mid.Enabled = True
Txt_Mname = ""
Txt_Mpass(0) = ""
Txt_Mpass(1) = ""
Chk_Muser = 0
Chk_Mbook = 0
image_Mphoto.Picture = LoadPicture(App.Path + "\ico\photo.ico")
End If

End Sub
Private Sub image_Mphoto_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 1 Then
        CommonDialog1.Filter = "*.bmp|*.bmp;*.jpg|*.jpg;*.ico|*.ico"
        CommonDialog1.ShowOpen
        image_Mphoto.Picture = LoadPicture(CommonDialog1.FileName)
    End If
    If Button = 2 And image_Mphoto.Picture.Type = 1 Then
       If MsgBox("确认删除照片?", vbCritical + vbOKCancel) = vbOK Then image_Mphoto.Picture = LoadPicture(App.Path + "\ico\photo.ico")
    End If
End Sub

Private Sub lbl_delphoto_Click() '删除相片
CommonDialog1.FileName = ""
image_Mphoto.Picture = LoadPicture(App.Path + "\ico\photo.ico")

End Sub

⌨️ 快捷键说明

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