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

📄 frmsuper.frm

📁 一个功能比较完善的远程抄表软件
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmSuper 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "系统管理员口令设置"
   ClientHeight    =   2115
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4200
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2115
   ScaleWidth      =   4200
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox txtPWD 
      Height          =   285
      IMEMode         =   3  'DISABLE
      Left            =   2040
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   600
      Width           =   1335
   End
   Begin VB.TextBox txtPWD2 
      Height          =   285
      IMEMode         =   3  'DISABLE
      Left            =   2040
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   960
      Width           =   1335
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定"
      Default         =   -1  'True
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   600
      TabIndex        =   1
      Top             =   1440
      Width           =   1215
   End
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      Caption         =   "取消"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2280
      TabIndex        =   0
      Top             =   1440
      Width           =   1215
   End
   Begin VB.Label Label1 
      Caption         =   "系统管理员名:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   720
      TabIndex        =   7
      Top             =   240
      Width           =   1215
   End
   Begin VB.Label Label2 
      BorderStyle     =   1  'Fixed Single
      Caption         =   "SUPER"
      Height          =   255
      Left            =   2040
      TabIndex        =   6
      Top             =   240
      Width           =   1335
   End
   Begin VB.Label Label3 
      Caption         =   "口令:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   720
      TabIndex        =   5
      Top             =   600
      Width           =   1215
   End
   Begin VB.Label Label4 
      Caption         =   "口令确认:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   720
      TabIndex        =   4
      Top             =   960
      Width           =   1215
   End
End
Attribute VB_Name = "frmSuper"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居收藏整理
'发布日期:2007/07/09
'描    述:CBB三表户外计量系统 Ver 5.2
'网    站:http://www.Mndsoft.com/  (VB6源码博客)
'网    站:http://www.VbDnet.com/   (VB.NET源码博客,主要基于.NET2005)
'e-mail  :Mndsoft@163.com
'e-mail  :Mndsoft@126.com
'OICQ    :88382850
'          如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************
Private Sub cmdCancel_Click()
    Unload frmSuper
End Sub

Private Sub cmdOK_Click()
Dim rcsuper As Recordset

'status
    AppendStatusInfo "设置管理员口令", icoBLUE
    SaveLog "设置管理员口令", 0
    If Trim(txtPWD.Text) <> Trim(txtPWD2.Text) Then
'status
        AppendStatusInfo "管理员口令两次输入不一致", icoBLUE
        SaveLog "管理员口令两次输入不一致", 0
        MsgBox "两次口令输入不一致" + Chr(10) + "请重新输入", , "系统管理员口令设置"
        Exit Sub
    Else
        Set rcsuper = dbCbb.OpenRecordset("Super", dbOpenDynaset)
        If rcsuper.EOF Then
            rcsuper.AddNew
            rcsuper!id = "SUPER"
            rcsuper!Password = Trim(txtPWD.Text)
            rcsuper.Update
        Else
            rcsuper.Edit
            rcsuper!id = "SUPER"
            rcsuper!Password = Trim(txtPWD.Text)
            rcsuper.Update
        End If
    End If
    Unload frmSuper
End Sub

Private Sub Form_Load()
    If UBound(curForm) > 0 Then
        curForm(UBound(curForm)).Enabled = False
    End If
    ReDim Preserve curForm(UBound(curForm) + 1)
    Set curForm(UBound(curForm)) = Me
    
    frmSuper.Width = 4305
    frmSuper.Height = 2550
    
Dim rcsuper As Recordset

    Set rcsuper = dbCbb.OpenRecordset("Super", dbOpenSnapshot)
    If Not rcsuper.EOF Then
        If Not IsNull(Trim(rcsuper!Password)) Then
            txtPWD.Text = Trim(rcsuper!Password)
            txtPWD2.Text = Trim(rcsuper!Password)
        End If
    End If
    DoEvents
End Sub

Private Sub Form_Unload(Cancel As Integer)
    ReDim Preserve curForm(UBound(curForm) - 1)
    If UBound(curForm) > 0 Then
        curForm(UBound(curForm)).Enabled = True
    End If

End Sub

⌨️ 快捷键说明

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