View Single Post
Old Nov 1st, 2006, 1:33 PM   #4
Iftikhar
Programmer
 
Iftikhar's Avatar
 
Join Date: Oct 2006
Location: London
Posts: 40
Rep Power: 0 Iftikhar is on a distinguished road
Send a message via MSN to Iftikhar
Because you are creating new form by using new keyword so all of your previous data is lost.
You can have private objects of the forms you want to show hide. Before displaying them check the specific object is null or not. If it is null then create a new form with new keyword else just show the form or hide it. In this way you will not loose data. for example
 public class MainForm
{
private TFX_Script o_TFX_Script;

click_function()
{
  if (o_TFX_Script == null)
  {
    o_TFX_Script = new TFX_Script();
    o_TFX_Script.Show();
  }
  else
  {
    o_TFX_Script.Show();
  }
}
}
__________________
Iftikhar Ahmed Khan
For doing an experiment on programmer's mood please visit http://uxisfyp1.brunel.ac.uk/cspgiak
Iftikhar is offline   Reply With Quote