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

📄 frm_zhuc.frm

📁 远程控制水表的系统。基于无线传输技术对水表远程进行操作
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frm_zhuc 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "用户注册"
   ClientHeight    =   3135
   ClientLeft      =   45
   ClientTop       =   450
   ClientWidth     =   6135
   Icon            =   "frm_zhuc.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   3135
   ScaleWidth      =   6135
   ShowInTaskbar   =   0   'False
   Begin VB.Frame Frame1 
      Caption         =   "添加用户"
      ForeColor       =   &H80000001&
      Height          =   2895
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   5895
      Begin MSAdodcLib.Adodc Adodc1 
         Height          =   330
         Left            =   2280
         Top             =   2400
         Visible         =   0   'False
         Width           =   1200
         _ExtentX        =   2117
         _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.Frame Frame2 
         Caption         =   "用户权限"
         ForeColor       =   &H00000040&
         Height          =   735
         Left            =   0
         TabIndex        =   11
         Top             =   1560
         Width           =   5895
         Begin VB.OptionButton Option2 
            Caption         =   "只能浏览数据"
            Height          =   375
            Left            =   2040
            TabIndex        =   13
            Top             =   240
            Width           =   1455
         End
         Begin VB.OptionButton Option1 
            Caption         =   "数据的所有权限"
            Height          =   375
            Left            =   120
            TabIndex        =   12
            Top             =   240
            Value           =   -1  'True
            Width           =   2295
         End
         Begin VB.Label Label5 
            Caption         =   "默认已选中所有权限"
            ForeColor       =   &H00000080&
            Height          =   255
            Left            =   4080
            TabIndex        =   14
            Top             =   450
            Width           =   1695
         End
      End
      Begin VB.CommandButton Command2 
         Caption         =   "取  消"
         Height          =   375
         Left            =   3960
         TabIndex        =   10
         Top             =   2400
         Width           =   975
      End
      Begin VB.CommandButton Command1 
         Caption         =   "添  加"
         Height          =   375
         Left            =   840
         TabIndex        =   9
         Top             =   2400
         Width           =   975
      End
      Begin VB.TextBox Text4 
         Appearance      =   0  'Flat
         BackColor       =   &H80000018&
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   390
         IMEMode         =   3  'DISABLE
         Left            =   3960
         PasswordChar    =   "*"
         TabIndex        =   7
         Top             =   1080
         Width           =   1575
      End
      Begin VB.TextBox Text3 
         Appearance      =   0  'Flat
         BackColor       =   &H80000018&
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   390
         IMEMode         =   3  'DISABLE
         Left            =   1320
         PasswordChar    =   "*"
         TabIndex        =   6
         Top             =   1080
         Width           =   1575
      End
      Begin VB.TextBox Text2 
         Appearance      =   0  'Flat
         BackColor       =   &H80000018&
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   390
         Left            =   3960
         TabIndex        =   4
         Top             =   360
         Width           =   1575
      End
      Begin VB.TextBox Text1 
         Appearance      =   0  'Flat
         BackColor       =   &H80000018&
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   390
         Left            =   1320
         TabIndex        =   2
         Top             =   360
         Width           =   1575
      End
      Begin VB.Label Label4 
         Caption         =   "确认密码:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   3000
         TabIndex        =   8
         Top             =   1200
         Width           =   1095
      End
      Begin VB.Label Label3 
         Caption         =   "用户密码:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   360
         TabIndex        =   5
         Top             =   1200
         Width           =   1095
      End
      Begin VB.Label Label2 
         Caption         =   "真实姓名:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   3000
         TabIndex        =   3
         Top             =   480
         Width           =   1095
      End
      Begin VB.Label Label1 
         Caption         =   "用户帐号:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   360
         TabIndex        =   1
         Top             =   480
         Width           =   1095
      End
   End
End
Attribute VB_Name = "frm_zhuc"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs1 As New ADODB.Recordset
Dim str As String
Private Sub Command1_Click()
Adodc1.ConnectionString = PublicStr
Adodc1.RecordSource = "select * from username where 用户帐号 ='" + Text1.Text + "'"
Adodc1.Refresh
If Trim(Text1.Text) = "" Then                              '判断用户名称是否为空
        MsgBox "请输入用户名称!", vbOKOnly + vbExclamation, "警告"
        Exit Sub
        Text1.SetFocus
Else
    If Adodc1.Recordset.RecordCount > 0 Then
        MsgBox "该帐名称已经被占用!"
        Text1.SetFocus   '使控件获得焦点
        Exit Sub
    Else
       If Trim(Text3.Text) <> Trim(Text4.Text) Then
       MsgBox "两次输入的密码不相同!"
        Text3.SetFocus   '使控件获得焦点
        Text3.Text = ""
        Text4.Text = ""
       End If
    End If
End If
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("用户帐号") = Text1.Text
Adodc1.Recordset.Fields("真实姓名") = Text2.Text
Adodc1.Recordset.Fields("密码") = Text4.Text
If Option1.Value = True Then
Adodc1.Recordset.Fields("用户权限") = "所有权限"
Else
Adodc1.Recordset.Fields("用户权限") = "只能浏览"
End If
Adodc1.Recordset.Update
MsgBox "用户注册成功!"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Unload(Cancel As Integer)
Unload Me
End Sub

⌨️ 快捷键说明

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