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

📄 frmdeleteuser.frm

📁 软件工程实验报告 银行储蓄管理系统 1.可行性分析 2.总体设计 3.详细设计 4.实验报告模板
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmDeleteUser 
   BackColor       =   &H00404040&
   BorderStyle     =   1  'Fixed Single
   ClientHeight    =   3090
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   7815
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   3090
   ScaleWidth      =   7815
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      Caption         =   "取 消"
      Height          =   345
      Left            =   4680
      TabIndex        =   6
      Top             =   2400
      Width           =   975
   End
   Begin VB.CommandButton cmdFind 
      Caption         =   "查 看"
      Height          =   345
      Left            =   2040
      TabIndex        =   2
      Top             =   2400
      Width           =   975
   End
   Begin VB.CommandButton cmdFinally 
      Caption         =   "完 成"
      Default         =   -1  'True
      Height          =   345
      Left            =   3360
      TabIndex        =   3
      Top             =   2400
      Width           =   975
   End
   Begin VB.TextBox txt 
      Appearance      =   0  'Flat
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      IMEMode         =   3  'DISABLE
      Left            =   2760
      TabIndex        =   1
      Top             =   1440
      Width           =   2415
   End
   Begin VB.Label lbl 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "请入新用户的帐号:"
      ForeColor       =   &H00FFFFFF&
      Height          =   180
      Index           =   4
      Left            =   1080
      TabIndex        =   5
      Top             =   1560
      Width           =   1620
   End
   Begin VB.Label lbl 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "(用户名不能长于12位)"
      ForeColor       =   &H00FFFFFF&
      Height          =   180
      Index           =   1
      Left            =   5400
      TabIndex        =   4
      Top             =   1560
      Width           =   1800
   End
   Begin VB.Label lbl 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "删除用户"
      BeginProperty Font 
         Name            =   "华文新魏"
         Size            =   15.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   315
      Index           =   2
      Left            =   3120
      TabIndex        =   0
      Top             =   240
      Width           =   1260
   End
   Begin VB.Line line 
      BorderColor     =   &H00FFFFFF&
      BorderWidth     =   2
      X1              =   0
      X2              =   7800
      Y1              =   600
      Y2              =   600
   End
End
Attribute VB_Name = "frmDeleteUser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rst As Recordset

Private Sub cmdCancel_Click()
    Unload Me
End Sub

'响应 "完成" 按钮
Private Sub cmdFinally_Click()
    Set rst = New Recordset
    Dim canDelete As Boolean
    canDelete = False
    Call LinkDB(landWay, SName, "weboy", SUName, SUPw)
    con.Open
    rst.Open "select name from users", con, adOpenDynamic, adLockOptimistic
    Do While Not rst.EOF
        If rst!name = txt.Text Then
            canDelete = True
        End If
        rst.MoveNext
    Loop
    rst.Close
    If canDelete = False Then
        MsgBox "帐户未找到,请确定您所输入的正确!"
        con.Close
        Exit Sub
    Else
        con.Execute "delete from users where name='" & txt.Text & "'"
        MsgBox "帐号删除成功!"
        con.Close
        Unload Me
    End If
End Sub

'响应 "查看" 按钮
Private Sub cmdFind_Click()
    Set rst = New Recordset
    Call LinkDB(landWay, SName, "weboy", SUName, SUPw)
    con.Open
    rst.Open "select * from users", con, adOpenDynamic, adLockOptimistic
    rst.MoveFirst
    Do While Not rst.EOF
        frmAllUser.lst.AddItem (rst!name)
        rst.MoveNext
    Loop
    rst.Close
    con.Close
    frmAllUser.Show
End Sub

⌨️ 快捷键说明

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