Cannot access a disposed object?

前端 未结 6 1472
面向向阳花
面向向阳花 2020-12-16 04:50

I have a countdown Timer form - on the first form the user will enter the countdown time - warning times, end message, etc. There are also two Radio buttons (Max/Min) and d

6条回答
  •  半阙折子戏
    2020-12-16 05:27

    What you can do is add a following check before calling .Show method:

    if(_Max == null || _Max.IsDisposed)
        _Max = new MaxForm();       
    
    _Max.Show();
    

    and similarly for _Min form

提交回复
热议问题