Check Target Form in Live????
-
In my code I am going to hide my active form and show another form. In that case are there any way to check me that other(2nd) form is loaded or not, Something like to check null or not. Because currently I am facing for a problem that is sometime my form going crashed and nothing display, at the same time my other form is already hide. Then my application is something like losen(hang). I j’t want a solution for that.
-
In my code I am going to hide my active form and show another form. In that case are there any way to check me that other(2nd) form is loaded or not, Something like to check null or not. Because currently I am facing for a problem that is sometime my form going crashed and nothing display, at the same time my other form is already hide. Then my application is something like losen(hang). I j’t want a solution for that.
ASysSolvers wrote:
sometime my form going crashed and nothing display,
your best fix is to fix the code in this form. Also, a good solution is to have both forms as controls and show them on the one form.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
In my code I am going to hide my active form and show another form. In that case are there any way to check me that other(2nd) form is loaded or not, Something like to check null or not. Because currently I am facing for a problem that is sometime my form going crashed and nothing display, at the same time my other form is already hide. Then my application is something like losen(hang). I j’t want a solution for that.
In the code in the first form that displays the second form, after declaring the second form's instance but before calling show() subscribe to the second form's Shown event. Then, in the handler, hide the first form.
Form2 f2 = new Form2();
f2.Shown += new EventHandler(f2_Shown);
f2.Show();void f2_Shown(object sender, EventArgs e)
{
Hide();
}Dave