如何在下一个表单的上一个表单的文本框中显示信息? [英] How to display the information in textboxes of previous forms in the next form ?

查看:92
本文介绍了如何在下一个表单的上一个表单的文本框中显示信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了2个表格.而且我在每种表格中都插入了6,6个文本框.我想在下一个表格中显示前两个表格的所有信息.请某人告诉我正确的语法,以便在下一个格式中显示最后两种形式的信息.

I have made 2 forms. and i have inserted 6,6 text boxes in each form . an i want to display all the information of the previous two forms in the next form . plz somebody tell me the correct syntax to display the information of the last two forms in the next from.

推荐答案


假设您正在使用WinForms,而不是基于Web的解决方案,最简单的方法是: 1)在目标表单中创建几个公共属性,并在调用Show或ShowDialog方法之前进行设置.

2)为目标表单创建一个构造函数,该构造函数采用必要的参数进行显示.

无论哪种方式,您都封装数据并仅将目标表单实例提供所需的数据.
Assuming you are using WinForms, rather than a web based solution, the easiest way is to either:
1) Create a couple of public properties in the destination form and set them just before you call the Show or ShowDialog methods.
or
2) Create a constructor for the destination form which takes the necessary parameters for display.

Either way you encapsulate the data and only feed the destination form instance the data it requires.


使用Get {}和Set {}方法的属性.
Use the Properties of Get{ } and Set { } Method.


这篇关于如何在下一个表单的上一个表单的文本框中显示信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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