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

📄 修改密码.frm

📁 该课题采用VB+SQLSERVER实现一个管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form7 
   Caption         =   "Form7"
   ClientHeight    =   3090
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3090
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame1 
      Height          =   2775
      Left            =   480
      TabIndex        =   0
      Top             =   360
      Width           =   4215
      Begin VB.TextBox Text3 
         Enabled         =   0   'False
         Height          =   390
         Left            =   960
         TabIndex        =   9
         Top             =   240
         Width           =   1935
      End
      Begin VB.CommandButton Command3 
         Caption         =   "退出"
         Height          =   375
         Left            =   2640
         TabIndex        =   7
         Top             =   1920
         Width           =   735
      End
      Begin VB.CommandButton Command2 
         Caption         =   "提交"
         Height          =   375
         Left            =   1560
         TabIndex        =   6
         Top             =   1920
         Width           =   855
      End
      Begin VB.CommandButton Command1 
         Caption         =   "返回"
         Height          =   375
         Left            =   480
         TabIndex        =   5
         Top             =   1920
         Width           =   855
      End
      Begin VB.TextBox Text2 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   960
         PasswordChar    =   "*"
         TabIndex        =   4
         Top             =   1200
         Width           =   1935
      End
      Begin VB.TextBox Text1 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   960
         PasswordChar    =   "*"
         TabIndex        =   3
         Top             =   720
         Width           =   1935
      End
      Begin VB.Label Label3 
         Caption         =   "用户"
         Height          =   255
         Left            =   360
         TabIndex        =   8
         Top             =   360
         Width           =   615
      End
      Begin VB.Label Label2 
         Caption         =   "新密码"
         Height          =   375
         Left            =   240
         TabIndex        =   2
         Top             =   1320
         Width           =   735
      End
      Begin VB.Label Label1 
         Caption         =   "旧密码"
         Height          =   255
         Left            =   240
         TabIndex        =   1
         Top             =   840
         Width           =   735
      End
   End
End
Attribute VB_Name = "Form7"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Command1_Click()
Unload Me
Form1.Show
End Sub
Private Sub Command2_Click()

Text3.Text = username
If password <> Text1.Text Then

MsgBox "密码不正确请重新填写"

Else:
Dim Rs1 As New ADODB.Recordset
Dim chaxun1 As String
Set Rs1 = New Recordset
chaxun1 = " update 用户 set 密码='" & Text2.Text & "'  where  用户名= '" & Text3.Text & "'"
Rs1.Open chaxun1, Str, adOpenKeyset, adLockOptimistic, adCmdText
On Error GoTo li2

GoTo li1
li2: MsgBox "添加失败"
li1:
MsgBox "修改成功"

End If


End Sub

Private Sub Command3_Click()
If MsgBox("确实要退出吗?", vbOKCancel + vbQuestion, "系统退出") = vbOK Then
        Unload Me
    Else
        Exit Sub
    End If
End Sub

Private Sub Command4_Click()
Dim a As Integer
Dim b As Integer

a = 2
If a = 1 Then
b = 1
Else:
b = 2
MsgBox b
b = 3
End If
MsgBox b

End Sub


⌨️ 快捷键说明

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