Its not working.
Its working on the program where the user click on the menu Options since for now its only showing na empty new form window.
So when i click on Options its showing the new form when i close the form and click on Options again its showing fhr new form again.
Thats ok.
But on my other program on the new form im creating an graph.
so im not only show(); the new form but also im create(); the graph:
private void Show_satistics_ CheckedChanged( object sender, EventArgs e)
{
if (Show_satistics .Checked)
{
if (statform == null || statform.IsDisp osed)
{
statform = new StatisticForm() ;
statform.Show() ;
statform.Create Graph();
}
else
{
statform.Show() ;
}
}
So the problem here is the line : statform.Create Graph();
Since there is a new instance there so each time im checking the box unchecking and checking again its not opening a new window of the new form but its updating the graph inside the new form over and over again. Since its making the statform.Create Graph(); so itsl ike creating many graphs in the new form.
Any idea how to solve the problem with the statform.Create Graph(); ? I solved the problem with the statform.Show() ; but now the other problem.
Thanks for help.
Its working on the program where the user click on the menu Options since for now its only showing na empty new form window.
So when i click on Options its showing the new form when i close the form and click on Options again its showing fhr new form again.
Thats ok.
But on my other program on the new form im creating an graph.
so im not only show(); the new form but also im create(); the graph:
private void Show_satistics_ CheckedChanged( object sender, EventArgs e)
{
if (Show_satistics .Checked)
{
if (statform == null || statform.IsDisp osed)
{
statform = new StatisticForm() ;
statform.Show() ;
statform.Create Graph();
}
else
{
statform.Show() ;
}
}
So the problem here is the line : statform.Create Graph();
Since there is a new instance there so each time im checking the box unchecking and checking again its not opening a new window of the new form but its updating the graph inside the new form over and over again. Since its making the statform.Create Graph(); so itsl ike creating many graphs in the new form.
Any idea how to solve the problem with the statform.Create Graph(); ? I solved the problem with the statform.Show() ; but now the other problem.
Thanks for help.
Comment