Community
Hi,
I am loading a form which is populated with several pictures and controls.
There is a small delay in it's loading so I would like to hide it and make it visible again.
How do I check if it's loaded?
If SOMETHING Then FormShapes.Show() Else Application.ShowModalDialog(Application.MainWindow.Handle, FormShapes, False) End If
Solved! Go to Solution.
Solved by _gile. Go to Solution.
Hi,
You can use a static (Shared) field to store the form instance that you initialize only once per session if it's null (Nothing).
static Dialog formShapes = null; public static void SomeMethod() { var doc = Application.DocumentManager.MdiActiveDocument; if (formShapes == null) formShapes = new Dialog(); // or whatever the form class name
Application.ShowModalDialog(doc.Window.Handle, formShapes, false);
[...] }