How can i close a form instance (it’s a singleton) from a static method? It’s a fade in/out form that i need to close without effects in some situation based on a bool value in FormClosing Event. The main issue is that when I show a dialog form when this tooltip form is showed at the end of fade out timer both form closes. Thank you.
Share
If your form is singleton I suggest you to define a private property in your form, containing the instance. This property can be initialized in
OnCreatedevent. Using this property you can do whatever you want with your form inside your static methods.