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

📄 mima.frm

📁 这是一个啤酒行业的软件,用VB6开发的
💻 FRM
字号:
VERSION 5.00
Begin VB.Form mima 
   Caption         =   "修改密码窗口"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text1 
      Height          =   285
      IMEMode         =   3  'DISABLE
      Left            =   2190
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   360
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      Height          =   285
      IMEMode         =   3  'DISABLE
      Left            =   2190
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   990
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   435
      Left            =   540
      TabIndex        =   1
      Top             =   2100
      Width           =   915
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   435
      Left            =   2040
      TabIndex        =   0
      Top             =   2100
      Width           =   975
   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          =   345
      Left            =   510
      TabIndex        =   5
      Top             =   360
      Width           =   1395
   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          =   345
      Left            =   480
      TabIndex        =   4
      Top             =   1050
      Width           =   1425
   End
End
Attribute VB_Name = "mima"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim ENv As rdoEnvironment
Dim cn As rdoConnection
Dim result As rdoResultset
Dim d_conn, sql As String

Private Sub Command1_Click()
    If Trim(Text1.Text) <> Trim(Text2.Text) Then
          MsgBox "密码输入不正确!", vbOKOnly + vbExclamation, "提示"
          Text1.SetFocus
          Text1.Text = ""
          Text2.Text = ""
     Else
        Dim username2 As String
        username2 = InputBox("请输入原来密码:")
        If username2 = username1 Then
            sql = "update pgpass set 口令='" & (Text1.Text) & "' where 姓名='" & (username) & "' and 口令='" & (username1) & "'"
            Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
            
            
            MsgBox "修改密码成功!", vbOKOnly + vbExclamation, "提示"
            sql = "select * from pgpass where 姓名='" & Trim(username) & "' "
            Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
            If result.RowCount <> 0 Then
               username = Trim(result("姓名"))
               username1 = Trim(result("口令"))
             
            End If
        Else
               MsgBox "修改密码失败!", vbOKOnly + vbExclamation, "提示"
        End If
     End If
End Sub

Private Sub Command2_Click()
    Unload mima
End Sub

Private Sub Form_Load()
     Move Screen.Width / 2 - mima.Width / 2, Screen.Height / 2 - mima.Height / 2 - 500
     Set ENv = rdoEnvironments(0)
     ENv.CursorDriver = rdUseOdbc
     d_conn = "uid=sa;pwd=;driver={SQL SERVER};SERVER=ntserver;database=rongpin2004;"
     Set cn = ENv.OpenConnection(dsname:="odbc_api_demo", Prompt:=rdodriverprompt, ReadOnly:=False, Connect:=d_conn)

End Sub

⌨️ 快捷键说明

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