amillyard
asked on
closing winform
Can open a 2nd WinForm via the 1st main WinForm.
Created an association (ownership) between the 1st and newly opened 2nd WinForm
The scripting also checks to see if the WinForm has been opened already ... this works (appears too).
Issue is: when closing the 2nd WinForm and then wanting to open it again I call the opening WinForm script again -- but I cannot reopen the WinForm (once closed) -- I suspect it has something to with the formBrowser null status.
How do I reset this parameter or get working correctly?
Created an association (ownership) between the 1st and newly opened 2nd WinForm
The scripting also checks to see if the WinForm has been opened already ... this works (appears too).
Issue is: when closing the 2nd WinForm and then wanting to open it again I call the opening WinForm script again -- but I cannot reopen the WinForm (once closed) -- I suspect it has something to with the formBrowser null status.
How do I reset this parameter or get working correctly?
// WinForm #1
FormBrowser formBrowser;
if (formBrowser != null) return;
formBrowser = new FormBrowser { Owner = this };
formBrowser.Show();
Have you put in a breakpoint to see if formBrowser is null?
ASKER
angus_young_acdc: checking the breakpoint ... null the 1st time called. the 2nd onwards is not displayed as null, but is soft of empty ! when disposing the WinForm, it is not resetting back to null status
try
formBrowser.Showdialog(thi s)
formBrowser.Showdialog(thi
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
carl_tawn: & emoreau: works great now :-) many thanks.