如何在c#窗口中创建图片密码 [英] How to create picture password in c# like windows

查看:63
本文介绍了如何在c#窗口中创建图片密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在c#中创建一个类似于windows图片密码的应用程序,但在此我想在图片框内使用不可见的小标签但是在执行时图片加载并且用户点击图片和标签上的文字不可见的被记录并保存在数据库中,当用户登录并点击那些特定的隐藏标签时,如果它们是正确的,他可以登录。如果您对此申请有任何其他想法,请告诉我吗?



我尝试过:



我尝试在图片框上放置标签,然后将其可见属性设为false并将文本放在文本框上的标签上但是它们不能正常工作

i want to make an application in c# similar to windows picture password but in this i want to use small labels inside the picturebox which will be invisible but when executed the picture loads and user clicks on the image and the text on the labels which are invisible be recorded and saved in the database and when the user logs in and clicks those specific hidden labels if they are correct he may login. If u have any other idea of making this application please do tell me?

What I have tried:

I tried putting labels on picture box and then making their visible property false and getting the text on the labels on a textbox but they r not working

推荐答案

您不使用PictureBox和Labels执行此操作。如果用户击中两个或多个标签之间的边界,问题是什么?你可以得到任何一个但不一致的。你必须有一些算法来查看每次触摸并确定触摸是否足够接近。



此外,PicturePassword适用于笔划,而不仅仅是点触摸。你无法使用标签获得该功能。



我认为更好的起点是使用Ink [ ^ ]。它更像是一个笔接口,可以更容易地适应你想要做的事情。



但是,这是一个更大的问题。您不能在您销售的商业应用程序中使用它。图片密码是微软获得专利的概念。
You do NOT do this using a PictureBox and Labels. The problem is what if the user hits the border between two or more labels? You can get any of them but inconsistently. You have to have some algorithm that looks at each touch and determines if the touch was "close enough".

Also, PicturePassword works with strokes, not just point touches. You can't get that feature using Labels.

I think the better starting point would be to use Ink[^]. It's more of a pen interface that can be more readily adapted to what you want to do.

BUT, there's a bigger problem. You cannot use this in a commercial application that you sell. Picture Password is a concept patented by Microsoft.


这篇关于如何在c#窗口中创建图片密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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