I can't get value from form2 combobox. I checked that combobox modifier set to 'Public'.
I get the 'Object not referenced to instance of a object' error. What is the mistake?
//Form1
private DialogIO dio;
private void uosIO_ValueChanged(object sender, EventArgs e)
{
dio = new DialogIO();
dio.Show(); // Open Form2 and Set Some value on Combobox
}
// BGWorker get run call from form2 and run it on form1.
private void bgwCustomIO_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
{
MessageBox.Show(dio.uceMinHour.Text); // Show Combobox Value
}