如何使用C#链接两种形式 [英] how to link two forms using c#

查看:123
本文介绍了如何使用C#链接两种形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们.我需要使用C#链接我的form1和form2的代码.请帮助我.

hay guys. i need code for link my form1 and form2 using c#. pls pls help me.

推荐答案

这可能是有关表单协作的流行问题.最可靠的解决方案是在表单类中实现适当的接口.请查看我过去的解决方案以获取更多详细信息:如何以两种形式在列表框之间复制所有项目 [
It might be the popular question about form collaboration. The most robust solution is implementation of an appropriate interface in form class. Please see my past solution for more detail: How to copy all the items between listboxes in two forms[^].

—SA


如果您要在表单之间传递数据,则 ^ ]应该可以为您提供帮助.

您可以使用委托在Windows窗体之间进行通信 [
IF you are looking for passing data between forms then Passing Data between Windows Forms[^] should help you.

You can use delegates to communicate between windows forms[^].


I以为您在谈论C#winform应用程序.试试这些:

在Windows窗体之间传递数据 [
I think you are talking about C# winform application. Try these:

Passing Data between Windows Forms[^]

hope it helps :)


这篇关于如何使用C#链接两种形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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