我有两种形式,我需要从form1.textbox1传递一个值到form2.variable
Form1中:
string Ed = "", En = "";
public string En1
{
get { return En; }
set { En = value; }
}
public string Ed1
{
get { return Ed; }
set { Ed = value; }
}
private void button1_Click(object sender, EventArgs e)
{
Form2 F2 = new Form2();
F2.Show();
F2.textbox1value = Ed;
F2.textbox2value = En;
}
Run Code Online (Sandbox Code Playgroud)
`和Form2:
public string textbox1value
{
get { return textBox1.Text; }
set { textBox1.Text = value; }
}
public string …Run Code Online (Sandbox Code Playgroud) 我有一个周期.迭代次数取决于用户的选择.我得到double的数量,但进度条只接受int;
double progr = 100 / (listBox2.Items.Count * listBox4.Items.Count);
progressBar1.Value += progr; <-
Run Code Online (Sandbox Code Playgroud)