C#winFrom中怎么把一个窗体文本框赋值给多个不同窗体,怎么判断窗体?
1条回答
- threenewbee 2018-11-26 10:41关注
如果问题得到解决,请点我回答左上角的采纳和向上的箭头,谢谢
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Q714723 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { new Form2().Show(); new Form3().Show(); new Form4().Show(); } private void button2_Click(object sender, EventArgs e) { foreach (Form item in Application.OpenForms) { if (item != this) (item.Controls["textBox1"] as TextBox).Text = textBox1.Text; } } } }
解决 1无用
悬赏问题
- ¥15 关于#java#的问题,请各位专家解答!
- ¥15 急matlab编程仿真二阶震荡系统
- ¥20 TEC-9的数据通路实验
- ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
- ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
- ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
- ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
- ¥15 如何实现H5在QQ平台上的二次分享卡片效果?
- ¥30 求解达问题(有红包)
- ¥15 请解包一个pak文件