I have a combo box in my C# which is place in form named frmMain
which is automatically fill when I add (using button button1_Click
) a product in my settings form named frmSettings
. When I click the button button1_Click
I want to reload the frmMain
for the new added product will be visible.
I tried using
frmMain main = new frmMain();
main.Close();
main.Show();
I know this code is so funny but it didn't work. :D
This is windows form!
EDIT
Please see this image of my program for better understanding.
This is my frmMain
Here is what my settings frmSettings
form look like. So, as you can see when I click the submit button I want to make the frmMain
to reload so that the updated value which I added to the settings will be visible to frmMain
comboBox.
this.Refresh()
doesn't reset values. – Shaharyar Apr 9 at 7:59