vb中怎样使窗口中的image图片不断闪烁?
vb中怎样使窗口中的image图片来回不停闪烁?怎样才能将密码口令设成可修改模式?比如:1.登陆-请输入口令...2.登陆完成后,修改密码:(1)请输入原密码(2)请输入...
vb中怎样使窗口中的image图片来回不停闪烁?
怎样才能将密码口令设成可修改模式?
比如:1.登陆-请输入口令...
2.登陆完成后,修改密码:(1)请输入原密码
(2)请输入新密码
(3)请再次输入新密码
3.修改密码成功 展开
怎样才能将密码口令设成可修改模式?
比如:1.登陆-请输入口令...
2.登陆完成后,修改密码:(1)请输入原密码
(2)请输入新密码
(3)请再次输入新密码
3.修改密码成功 展开
1个回答
展开全部
Private Sub Command1_Click()
Dim b As String
If Dir("c:\paw.db") = "" Then
Open "c:\paw.db" For Output As #1
Print #1, Text1.Text
Close #1
Else
Open "c:\paw.db" For Input As #1
Line Input #1, b
Close #1
If Text1.Text <> b Then
MsgBox "密码错误! 请重新输入", 48, "提示"
Exit Sub
End If
End If
Text1.Text = "请输入旧密码"
Text2.Visible = True
Text3.Visible = True
Command2.Visible = True
Command1.Visible = False
End Sub
Private Sub Command2_Click()
Dim b As String
Open "c:\paw.db" For Input As #1
Line Input #1, b
Close #1
If Text1.Text <> b Then
MsgBox "旧密码错误"
Exit Sub
End If
If Text2.Text = Text3.Text Then
Open "c:\paw.db" For Output As #1
Print #1, Text2.Text
Close #1
MsgBox "修改密码成功", , "提示"
Else
MsgBox "请重新输入新密码", 48, "提示"
End If
End Sub
Private Sub Form_Load()
Timer1.Interval = "100"
Text1.Text = "请输入登录密码"
Text2.Text = "请输入新的密码"
Text3.Text = "请再次输入新的密码"
Command1.Caption = "登录"
Command2.Caption = "确定修改"
Text2.Visible = False
Text3.Visible = False
Command2.Visible = False
End Sub
Private Sub Timer1_Timer()
If Me.Caption <> "1" Then
Me.Caption = 1
Image1.Visible = False
Else
Me.Caption = 0
Image1.Visible = True
End If
End Sub
Dim b As String
If Dir("c:\paw.db") = "" Then
Open "c:\paw.db" For Output As #1
Print #1, Text1.Text
Close #1
Else
Open "c:\paw.db" For Input As #1
Line Input #1, b
Close #1
If Text1.Text <> b Then
MsgBox "密码错误! 请重新输入", 48, "提示"
Exit Sub
End If
End If
Text1.Text = "请输入旧密码"
Text2.Visible = True
Text3.Visible = True
Command2.Visible = True
Command1.Visible = False
End Sub
Private Sub Command2_Click()
Dim b As String
Open "c:\paw.db" For Input As #1
Line Input #1, b
Close #1
If Text1.Text <> b Then
MsgBox "旧密码错误"
Exit Sub
End If
If Text2.Text = Text3.Text Then
Open "c:\paw.db" For Output As #1
Print #1, Text2.Text
Close #1
MsgBox "修改密码成功", , "提示"
Else
MsgBox "请重新输入新密码", 48, "提示"
End If
End Sub
Private Sub Form_Load()
Timer1.Interval = "100"
Text1.Text = "请输入登录密码"
Text2.Text = "请输入新的密码"
Text3.Text = "请再次输入新的密码"
Command1.Caption = "登录"
Command2.Caption = "确定修改"
Text2.Visible = False
Text3.Visible = False
Command2.Visible = False
End Sub
Private Sub Timer1_Timer()
If Me.Caption <> "1" Then
Me.Caption = 1
Image1.Visible = False
Else
Me.Caption = 0
Image1.Visible = True
End If
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询