如何在c#windows应用程序中将值从form1传递给form2
问题描述:
嗨frnds,
正在使用SqlDatabase处理c#项目。
我有两种形式Form1和form2。
在form1我有2个文本框和按钮
在form2我有2个标签
我想将Form1文本框值传递给form2标签。
请帮助我
在此先感谢。
hi frnds,
am working on c# project using SqlDatabase.
I have two forms Form1 and form2.
In form1 i have 2 textboxes and button
In form2 I have 2 labels
I want to pass Form1 textboxes values to form2 labels.
Please can you help me
Thanks in advance.
答
在表格之间传递数据 [ ^ ]
http://www.dreamincode.net/forums/topic/206458-how-to- get-values-from-form1-form2-or-any-other-forms / [ ^ ]
为什么你不谷歌呢?
这是基本的问题,我想当你能够在这里发帖然后你必须能够搜索它在谷歌上发布之前..
这里很少有链接..
在表格之间传递数据 [ ^ ]
使用事件在表单之间传递值 [ ^ ]
使用事件在表单之间传递值 [ ^ ]
why didn't you google it??
it's the basic question, i think when you are able to post here then you must be able to search it on google before posting here..
Few links here..
Passing Data Between Forms[^]
Pass value between forms using events[^]
Pass value between forms using events[^]
由于这个问题非常受欢迎,我以前的答案往往不太清楚,可能还不够清楚,我决定写一篇完整的提示/技巧文章详细的代码示例和解释:一次回答的许多问题 - Windows窗体之间的协作或WPF Windows 。-SA
As the question turned out to be very popular, and my previous answers often were not well understood, probably were not clear enough, I decided to write a Tips/Trick article complete with detailed code samples and explanations: Many Questions Answered at Once — Collaboration between Windows Forms or WPF Windows.—SA