- namespace WindowsFormsApplication1
- {
- public partial class Form1 : Form
- {
- Form2 ob;
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- string s;
- s = comboBox.SelectedIndex;
- ob = new Form2(s);
- ob.Show();
- }
- }
- }
- namespace WindowsFormsApplication1
- {
- public partial class Form2 : Form
- {
- string ss;
- public Form2(string s)
- {
- InitializeComponent();
- ss = s;
- comboBox.SelectedIndex = ss;
- }
- }
- }
Have a nice day... 'N happy Coding :)
No comments:
Post a Comment