如何在Windows应用程序中登录? [英] How can login in windows application?

查看:126
本文介绍了如何在Windows应用程序中登录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在创建登录表单,该表单具有两个分别用于用户名和密码的文本框以及两个保存和登录按钮.现在我可以通过按保存按钮将用户名和密码存储在数据库中.现在我需要代码登录.当我按登录按钮时,它应该检查用户名,密码是否正确.如果正确,它应该可以工作.请将编码发送给我.

谢谢与问候,

Viswanathan.M

Hi,

I am creating login form which has two text boxes for username and password correspondingly and two buttons which is save and login.Now i can store username and password in database by pressing save button.Now i need code to login.When i press login button,it should check the username,password is correct or not.If it is correct, it should work.Kindly send me the coding.

Thanks & Regards,

Viswanathan.M

推荐答案

你好Viswanthan,


您已创建用于插入数据的连接.然后使用该连接从数据表中的数据库存储中检索数据,并检查用户名和密码.如果匹配,则显示下一个窗口,否则显示消息,提示用户名密码错误.

您可以在登录按钮单击事件上做的所有事情



谢谢
sanjeev
hello Viswanthan,


you have created connection to insert the data. then use that connection to retrieve the data from ur DB store in Data table and check against ur username and password. if it matches then show the next window else show the message that username password is wrong.

this all you can do on login button click event



thanks
sanjeev


请检查以下链接:

一个简单的Windows窗体登录控件组件 [通用登录控件 [
Please check the below links:

A simple Windows Forms Login Control component[^]

Generic Login Control[^]


取决于您存储用户名和密码的位置(数据库,文件等) .

您需要编写逻辑,以便它检查此存储,然后仅在密码匹配时登录.
Depends on where you are storing your username and password (database, file etc).

You need to write your logic so that it checks against this store and then login only if the password matches.


这篇关于如何在Windows应用程序中登录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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