I am currently working with a c# desktop application that is connected to a web service. In one of the forms, I want to close form when the back button is clicked. I have done it like this:
private void bBack_Click(object sender, EventArgs e) { //this.Hide(); this.Close(); frmMain fMain = new frmMain(); fMain.MdiParent = this.MdiParent; fMain.Show(); } When I use this.Hide(), it seems like the form I want to close still runs in the background, thus still contacting the web service.
When I use this.Close(), the form seems to close and no contact to the web service is made, but my desktop application suddenly goes full screen and frmMain is opened in a new window.
I have read the documentation displayed here, but I could not find anything useful.