如何将在一个表单中输入的用户名和密码传递给C#中的另一个表单 [英] How to pass and display username and password entered in one form to another form in C#

查看:241
本文介绍了如何将在一个表单中输入的用户名和密码传递给C#中的另一个表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个带两个窗口的WPF应用程序,

第一个窗口包含:

1.用户名和2.密码文本框

3.one登录按钮



所以当用户在第一个窗口输入用户名和密码并点击登录按钮时,第二个窗口开了。



所以在第二个窗口我要显示登录用户名



我怎么能这样做呢any1请给我一个解决方案,因为我是C#的新手?

Hi,
I have a WPF application with two windows,
First window contains:
1.User name and 2. Password text boxes
3.one login button

so when the user enters username and password and clicks on login button in first window, second window gets opened.

so in second window i want to display the login user name

how can i do that can any1 please provide me a solution as am new to C#?

推荐答案

第一种形式是Parent,第二种形式是Child:在两种表格之间转移信息,第1部分:父母对儿童 [ ^ ]
First form is Parent, second form is Child: Transferring information between two forms, Part 1: Parent to Child[^]


类似问题的解决方案。 [ ^ ]


这篇关于如何将在一个表单中输入的用户名和密码传递给C#中的另一个表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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