using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class checklistboxpg : Form
{
public checklistboxpg()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
for (int i = 0; i <checkedListBox2.Items.Count; i++)
{
if (checkedListBox2.GetItemChecked(i))
{
checkedListBox2.Items.Add(checkedListBox2.Items[i].ToString());
}
}
}
private void button1_Click(object sender, EventArgs e)
{
for (int i = 0; i < checkedListBox1.Items.Count; i++)
{
if (checkedListBox1.GetItemChecked(i))
{
checkedListBox1.Items.Add(checkedListBox1.Items[i].ToString());
}
}
}
}
}
No comments:
Post a Comment