###前提・実現したいこと
2つのフォームForm1とForm2があり、Form2TextBoxに入力されている値をForm1で取得したい時にどのように渡せばよいでしょうか。。
###フォーム2
private void btnBack_Click(object sender, EventArgs e)//戻る { //Form2に送るテキスト string sendText = textBox1.Text; Close(); }
###フォーム1
public partial class Form1 : Form { private string[] argumentValues; //Form1から受け取った引数? private string sendText; private void btnMaintenance_Click(object sender, EventArgs e) { Form2 frm = new Form2(); frm.ShowDialog(this); frm.Dispose(); //分かりませんでした // this.textBox1.Text = frm.sendText; } }

バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/10/10 07:35