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

📄 frmyhgl.frm

📁 在重庆大学为毕业设计做的维修管理系统 为了赶时间做得不是很好
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmyhgl 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "用户管理"
   ClientHeight    =   2775
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   6285
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   2775
   ScaleWidth      =   6285
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   840
      Top             =   1560
      Visible         =   0   'False
      Width           =   2175
      _ExtentX        =   3836
      _ExtentY        =   661
      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=wx"
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   "wx"
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 用户表 order by 编号"
      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 MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "frmyhgl.frx":0000
      Height          =   2415
      Left            =   120
      TabIndex        =   8
      Top             =   240
      Width           =   3135
      _ExtentX        =   5530
      _ExtentY        =   4260
      _Version        =   393216
      AllowUpdate     =   0   'False
      HeadLines       =   1
      RowHeight       =   15
      FormatLocked    =   -1  'True
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   3
      BeginProperty Column00 
         DataField       =   "编号"
         Caption         =   "编号"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   "用户名"
         Caption         =   "用户名"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column02 
         DataField       =   "密码"
         Caption         =   "密码"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
            ColumnWidth     =   480.189
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   1080
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   2085.166
         EndProperty
      EndProperty
   End
   Begin VB.CommandButton cmdquit 
      Caption         =   "退出"
      Height          =   975
      Left            =   4920
      TabIndex        =   7
      Top             =   1560
      Width           =   1215
   End
   Begin VB.CommandButton cmddelete 
      Caption         =   "删除用户"
      Height          =   375
      Left            =   3480
      TabIndex        =   6
      Top             =   2160
      Width           =   1215
   End
   Begin VB.CommandButton cmdadd 
      Caption         =   "添加用户"
      Height          =   375
      Left            =   3480
      TabIndex        =   5
      Top             =   1560
      Width           =   1215
   End
   Begin VB.Frame Frame1 
      Height          =   1215
      Left            =   3360
      TabIndex        =   0
      Top             =   120
      Width           =   2775
      Begin VB.TextBox txtpwd 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   840
         PasswordChar    =   "#"
         TabIndex        =   4
         Top             =   720
         Width           =   1815
      End
      Begin VB.TextBox txtuser 
         Height          =   375
         Left            =   840
         TabIndex        =   3
         Top             =   240
         Width           =   1815
      End
      Begin VB.Label Label3 
         Caption         =   "密码"
         Height          =   255
         Left            =   120
         TabIndex        =   2
         Top             =   840
         Width           =   495
      End
      Begin VB.Label Label2 
         Caption         =   "用户名"
         Height          =   255
         Left            =   120
         TabIndex        =   1
         Top             =   360
         Width           =   615
      End
   End
End
Attribute VB_Name = "frmyhgl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub cmdadd_Click()

    If txtuser.Text = "" Then
        MsgBox "请输入用户名", vbCritical, "用户管理"
        txtuser.SetFocus
        
    ElseIf txtpwd.Text = "" Then
        MsgBox "请输入密码", vbCritical, "用户管理"
        txtpwd.SetFocus
   
    Else
        Adodc1.Recordset.AddNew
        Adodc1.Recordset.Fields("用户名") = txtuser.Text
        Adodc1.Recordset.Fields("密码") = txtpwd.Text
        Adodc1.Recordset.Update
        MsgBox "添加用户成功", vbInformation, "用户管理"
        txtuser.Text = ""
        txtpwd.Text = ""
        txtuser.SetFocus
        Adodc1.RecordSource = "select * from 用户表 order by 编号"
        Adodc1.Refresh
    
    End If
    
End Sub

Private Sub cmddelete_Click()
    
    a = MsgBox("你真的要删除用户" + Adodc1.Recordset.Fields("用户名") + "吗?", vbInformation + vbYesNo, "用户管理")
    If a = vbYes Then
        Adodc1.Recordset.Delete
        Adodc1.Recordset.MoveLast
    Else
       Exit Sub
    End If
    
End Sub

Private Sub cmdquit_Click()
    Unload Me
End Sub

⌨️ 快捷键说明

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