Good Day @Morgenstern ,
After checking the code from your previous question, it appears that
frmNewNote is the window you create via the main window.
frmNewNote.instance.Invoke(new MethodInvoker(frmNewNote.instance.Hide)); There is no problem with the code itself.
But when you finish running, you could close the current window directly.
For your main form,
frmopen should use
Show() to operate and should not be closed directly when running the opened form, otherwise you cannot return to the main form correctly. (Just a suggestion.)
For checking whether a form is opened or closed.
If your open means "visible", you can determine it by judging the
True means open.
The Visible property will be set to
false when you use the
If you want to determine whether the target window is released, you can use the
IsDisposed property to determine it.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.