关于表单中的隐藏密码 [英] About Hidden Password in Form

查看:75
本文介绍了关于表单中的隐藏密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在没有文本框的情况下在表单中键入隐藏密码?我的意思是喜欢在GTA中输入作弊?



i想在我的主窗体中设置密码以打开另一种形式。

Is it possible to type hidden password in form without textbox? i mean like typing the cheat in GTA?

i want to set a password in my mainform to open another form.

推荐答案

如果您的表单上有 KeyPreview = True ,那么您可以捕获表单上的任何击键,然后将它们传递到表单上的任何控件上。您可以在表单上的任何Key ***事件中分析它们,例如

If you have KeyPreview=True on your form then you can capture any keystrokes on the form before they get passed onto any controls on the form. You can analyse them in any of the Key*** events on the form e.g.
Private Sub Form1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
    pword += e.KeyCode.ToString()
End Sub


这篇关于关于表单中的隐藏密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆