急!!坐等答案。ListBox控件编程题

2024-12-26 16:22:31
推荐回答(3个)
回答1:

private void btn1_Click(object sender, EventArgs e)
{
if (listBox1.SelectedItem != null)
{
listBox2.Items.Add(listBox1.SelectedItem);
listBox1.Items.Remove(listBox1.SelectedItem);
}
}
private void btn2_Click(object sender, EventArgs e)
{
if (listBox2.SelectedItem != null)
{
listBox1.Items.Add(listBox2.SelectedItem);
listBox2.Items.Remove(listBox2.SelectedItem);
}
}

回答2:

好好考试!不要百度我出的题

回答3:

看不清楚!