朋友需要帮助请帮帮我 [英] Friends need for help please help me

查看:96
本文介绍了朋友需要帮助请帮帮我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友,我有一些表格,我的第一个表格是登录,用户可以使用用户名和密码输入

朋友我在主表单中收到相关用户的用户名,而我的表单是我想要的更多子表单检索从主窗体打开的其他窗体中的用户名

Dear friends i have some forms my first form is login where user can enter with username and password
friends i am receiving username of related user in the main form and my form more child forms i want to retrieve the username in other forms which is opening from main form

推荐答案

因此,设置其他窗体中的属性或方法,并在用户登录时传递。



或者(我不建议这样做)你可以将它设置为主窗体(或静态类)中的静态变量并以这种方式访问​​它从任何形式。
So set up a property or method in the other forms and pass it through when the user logs in.

Alternatively (and I don't recommend this) you could set it as a static variable in your main form (or a static class) and access it that way from any form.


这篇关于朋友需要帮助请帮帮我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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