用vb写一个文件:功能:输入密码,点击确定,如果对了就跳转到一个隐藏文件,不对就出现一个框“密码不正
答案:4 悬赏:0
解决时间 2021-02-11 20:44
- 提问者网友:多余借口
- 2021-02-11 11:32
用vb写一个文件:功能:输入密码,点击确定,如果对了就跳转到一个隐藏文件,不对就出现一个框“密码不正
最佳答案
- 二级知识专家网友:堕落奶泡
- 2021-02-11 11:39
'一个Text1,一个Command1
Private Sub Command1_Click()
If Text1.Text = "000000" Then
Shell "Notepad.exe D:\新文件夹" ' Else
MsgBox "密码不正确"
End If
End Sub
Private Sub Form_Load()
Text1.Text = ""
Command1.Caption = "确定"
End Sub
If Text1.Text = "000000" Then
Shell "Notepad.exe D:\新文件夹" ' Else
MsgBox "密码不正确"
End If
End Sub
如果还不明白,在窗体中设一个text1、一个command1,
把以下全复制到rorm命令里就可以了(就是双击command1,把下面的做个粘贴)
Private Sub Form_Load()
Text1.Text = ""
Command1.Caption = "确定"
End Sub
If Text1.Text = "000000" Then
Shell "Notepad.exe D:\新文件夹" ' Else
MsgBox "密码不正确"
End If
Private Sub Command1_Click()
If Text1.Text = "000000" Then
Shell "Notepad.exe D:\新文件夹" ' Else
MsgBox "密码不正确"
End If
End Sub
Private Sub Form_Load()
Text1.Text = ""
Command1.Caption = "确定"
End Sub
If Text1.Text = "000000" Then
Shell "Notepad.exe D:\新文件夹" ' Else
MsgBox "密码不正确"
End If
End Sub
如果还不明白,在窗体中设一个text1、一个command1,
把以下全复制到rorm命令里就可以了(就是双击command1,把下面的做个粘贴)
Private Sub Form_Load()
Text1.Text = ""
Command1.Caption = "确定"
End Sub
If Text1.Text = "000000" Then
Shell "Notepad.exe D:\新文件夹" ' Else
MsgBox "密码不正确"
End If
全部回答
- 1楼网友:恕我颓废
- 2021-02-11 14:40
private n as integer private sub command1_click() if text1.text <> "abc" or text2.text <> "abc" then n = n + 1 if n = 3 then msgbox "对不起,你不是本系统的合法用户" end end if msgbox "用户名或密码输入错误,请重新输入" else form2.show end if end sub
- 2楼网友:滚出爷的世界
- 2021-02-11 13:47
一个 text1 一个Command1 确定键
Private Sub Command1_Click()
If Text1 = "123" Then 这里改你的密码
MsgBox "祝贺你,成功登录"
Form2.Show: Form.Hide ' 显示窗口2,隐藏窗口1 ,
或你把这里的代码换成 shell "c:\123.exe"他就改成了打开 123.exe
Else
MsgBox "对不起,密码错误,无法登录!"
End If
End Sub
- 3楼网友:野心和家
- 2021-02-11 12:11
'一个Text1,一个Command1
Private Sub Command1_Click()
If Text1.Text = "密码" Then '密码自己改
Shell "Notepad.exe D:\文件.txt" '应用程序 和 文件名自己改
Else
MsgBox "密码不正确"
End If
End Sub
Private Sub Form_Load()
Text1.Text = ""
Command1.Caption = "确定"
End Sub
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯