发短信到另一种形式 [英] text to another form

查看:79
本文介绍了发短信到另一种形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿代码项目
我需要一些基本的帮助,以将文本从某种形式的一个文本框转移到另一种形式的另一文本框

一些基本的代码或heko会很棒的
感谢

heyy code project
i need some basic help in getting text from one textbox on a certain form to another textbox on another form

some basic code or heko will be great
thanks

推荐答案

采用2个表单form1.cs和form2.cs,每个表单上都有一个文本框,然后将每种表单上的文本框的修饰符属性从私有更改为公开向form1.cs添加一个按钮,方法是双击form1上的按钮,然后在按钮的click事件中添加以下代码

Form2 obj = new Form2();
obj.textbox1.Text = this.textbox1.Text;
obj.Show();
this.Hide();

然后运行该应用程序

谢谢与问候;
基数
take 2 forms form1.cs and form2.cs with one textbox on each forms and then change the modifier property of the textbox on each form from private to public add a button to form1.cs generate its click event by double clicking the button on form1 and then add in the following code in the click event of the button

Form2 obj = new Form2();
obj.textbox1.Text = this.textbox1.Text;
obj.Show();
this.Hide();

and then run the application

Thanks & Regards;
Radix


这篇关于发短信到另一种形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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