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

📄 frm_tjyh.frm

📁 企业生产管理系统 提供对企业的日常生产管理
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frm_Tjyh 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "用户管理"
   ClientHeight    =   1830
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4845
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1830
   ScaleWidth      =   4845
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Cmdexit 
      Caption         =   "退出"
      Height          =   375
      Left            =   3585
      TabIndex        =   9
      Top             =   1155
      Width           =   1095
   End
   Begin VB.CommandButton Command3 
      Caption         =   "添加用户"
      Height          =   375
      Left            =   3585
      TabIndex        =   8
      Top             =   660
      Width           =   1095
   End
   Begin VB.Frame Frame3 
      ForeColor       =   &H80000002&
      Height          =   1485
      Left            =   165
      TabIndex        =   0
      Top             =   105
      Width           =   3270
      Begin VB.TextBox Text5 
         Height          =   270
         Left            =   1545
         TabIndex        =   4
         Top             =   255
         Width           =   1425
      End
      Begin VB.TextBox Text6 
         Height          =   270
         IMEMode         =   3  'DISABLE
         Left            =   1545
         PasswordChar    =   "*"
         TabIndex        =   3
         Top             =   615
         Width           =   1425
      End
      Begin VB.TextBox Text7 
         DataField       =   "姓名"
         DataSource      =   "Adodc1"
         Height          =   270
         Left            =   2040
         TabIndex        =   2
         Text            =   "Text7"
         Top             =   90
         Visible         =   0   'False
         Width           =   975
      End
      Begin VB.TextBox Text8 
         Height          =   270
         IMEMode         =   3  'DISABLE
         Left            =   1545
         PasswordChar    =   "*"
         TabIndex        =   1
         Top             =   975
         Width           =   1425
      End
      Begin MSAdodcLib.Adodc Adodc1 
         Height          =   330
         Left            =   2805
         Top             =   30
         Visible         =   0   'False
         Width           =   1200
         _ExtentX        =   2117
         _ExtentY        =   582
         ConnectMode     =   0
         CursorLocation  =   3
         IsolationLevel  =   -1
         ConnectionTimeout=   15
         CommandTimeout  =   30
         CursorType      =   3
         LockType        =   3
         CommandType     =   2
         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;Persist Security Info=False;User ID=sa;Initial Catalog=company"
         OLEDBString     =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=company"
         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.Label Label6 
         Caption         =   "用 户 名:"
         Height          =   195
         Left            =   225
         TabIndex        =   7
         Top             =   300
         Width           =   1260
      End
      Begin VB.Label Label7 
         Caption         =   "密    码:"
         Height          =   225
         Left            =   210
         TabIndex        =   6
         Top             =   637
         Width           =   1290
      End
      Begin VB.Label Label8 
         Caption         =   "确认密码:"
         Height          =   255
         Left            =   210
         TabIndex        =   5
         Top             =   1005
         Width           =   1350
      End
   End
End
Attribute VB_Name = "frm_Tjyh"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdExit_Click()
  Unload Me
End Sub

Private Sub Command3_Click()
  If Text5.Text = "" Then
     MsgBox "用户名不能为空!", , "系统提示"
  Else
     If Text6.Text = Text8.Text Then
        On Error Resume Next
        Adodc1.Refresh
        Adodc1.Recordset.AddNew
        Adodc1.Recordset.Fields(0) = Text5.Text
        Adodc1.Recordset.Fields(1) = Text6.Text
        Adodc1.Recordset.Update
        Adodc1.Refresh
        Text5.Text = ""
        Text6.Text = ""
        Text8.Text = ""
        MsgBox "添加成功!", , "系统提示"
     Else
        MsgBox "两次输入的密码不正确!!", , "系统提示"
     End If
  End If
End Sub


Private Sub Form_Activate()
Text5.SetFocus
End Sub

Private Sub Text5_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn Then
     If Text5.Text = "" Then
        MsgBox "不能为空!", , "系统提示"
        Text5.SetFocus
     Else
        Text6.SetFocus
     End If
  End If
End Sub

Private Sub Text6_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn Then
     Text8.SetFocus
  End If
End Sub
Private Sub Text8_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn Then Command3.SetFocus
End Sub

⌨️ 快捷键说明

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