首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > VB Dotnet >

VB.NET设计登录密码修改界面

2012-05-11 
求助VB.NET设计登录密码修改界面Public Class LongFrmPublic PASS As BooleanPrivate Sub Button2_Click(B

求助VB.NET设计登录密码修改界面
Public Class LongFrm
  Public PASS As Boolean

  Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  Application.Exit()
  PASS = False
  End Sub

  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  PASS = False

  Dim UID As String
  Dim Paw As String
  UID = Me.TextBox1.Text

  Paw = Me.TextBox2.Text

  If UID <> "" And Paw <> "" Then
  If MainConfig.ExcuteLong("select * from UserID Where UserID = '" + UID + "' AND PASSWORD = '" + Paw + "'") >= 1 Then
  Me.Close()
  PASS = True
  Else
  MessageBox.Show("密码不正确")
  PASS = False
  Return
  End If

  End If

  End Sub
End Class
这个是登录界面的代码,请教下如何在系统设置菜单中建立一个密码修改界面,求代码

[解决办法]
添加一个窗体,添加各种空间后,在设置菜单命令的代码中用form.showdialog来显示添加的那个窗体就行啦
[解决办法]
UPDATE UserID SET PASSWORD = '" & NEWPASSWORD & "' WHERE UserID = '" & USERID &"' AND PASSWORD = '" & OLDPASSWORD &"'"

热点排行