Hanyu_Li
Hanyu_Li
采纳率0%
2017-09-29 06:26

VB程序中能不能关闭密码设置

这是个老程序,以前编这个程序的人吧密码忘了,现在没办法进入调试界面,求解决的办法,下面是调试窗口的代码
Private Sub CmdCancel_Click()
mainM3.Image_ManualTest.Picture = LoadPicture(App.Path + "\test.ico")
Me.Hide
End Sub

Private Sub cmdOK_Click()
cn.Close
cn.Open

sql = "select * from 密码管理 "
rs_login.Open sql, cn, adOpenKeyset, adLockPessimistic

If Trim(rs_login.Fields(0)) = Trim(txtPassword.Text) Then
    DebugLogIn.Hide
    FormDebug.Show 1
Else
    txtPassword.Text = ""
    txtPassword.SetFocus

    WrongMessage.Caption = "密码错误"
    WrongMessage.Label1.Caption = "密码错误,请重试!"
    WrongMessage.Show 1
End If

End Sub

Private Sub Form_Load()
Image1.Picture = LoadPicture(App.Path + "\Password.ico")

txtPassword.Text = ""
End Sub

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

3条回答

  • caozhy 从今以后生命中的每一秒都属于我爱的人 4年前

    If Trim(rs_login.Fields(0)) = Trim(txtPassword.Text) Then
    直接修改为
    If 1=1 Then

    点赞 评论 复制链接分享
  • cc105120185 「已注销」 4年前

    Private Sub CmdCancel_Click()
    mainM3.Image_ManualTest.Picture = LoadPicture(App.Path + "\test.ico")
    Me.Hide
    End Sub
    Private Sub cmdOK_Click()
    DebugLogIn.Hide
    FormDebug.Show 1
    End Sub
    Private Sub Form_Load()
    Image1.Picture = LoadPicture(App.Path + "\Password.ico")
    txtPassword.Text = ""
    End Sub

    点赞 评论 复制链接分享
  • cc105120185 「已注销」 4年前

    Private Sub CmdCancel_Click()
    mainM3.Image_ManualTest.Picture = LoadPicture(App.Path + "\test.ico")
    Me.Hide
    End Sub
    Private Sub cmdOK_Click()
    DebugLogIn.Hide
    FormDebug.Show 1
    End Sub
    Private Sub Form_Load()
    Image1.Picture = LoadPicture(App.Path + "\Password.ico")
    txtPassword.Text = ""
    End Sub

    点赞 评论 复制链接分享

相关推荐