I face with that issue, I checked some links on the Internet but failure to find an viable.
My issue comes out when I close second form's FormClosed event I think a delegate causes this matter. First is a login form when login passes correctly then I make the first form hide and second forms come alone on the screen. That delegate for a stopwatch that I show elapsed time on the statusbar. Here is some code.
C#
this.Hide(); MainForm mainform = new MainForm(); mainform.strUser = txtUsername.Text; mainform.ShowDialog(); public delegate void doupdate(); public void UpdateLabel() { doupdate db = new doupdate(DoUpdateLabel); this.Invoke(db); } public void DoUpdateLabel() { labelItem2.Text = timeelepse; } private void MainForm_FormClosed(object sender, FormClosedEventArgs e) { Application.Exit(); }
Shweta LodhaRank #31 · 39.8K reputationPosted Mar 3, 2014, 1:04 PM EST
Shweta LodhaRank #31 · 39.8K reputationPosted Mar 4, 2014, 8:51 AM EST
Is there any updates from your end ? Is your query resolved ?
Arda B33 reputationPosted Mar 4, 2014, 8:47 PM EST