[RESOLVED] Initialize Class Inside Shared Method
It's that even possible? :confused:
I created a simple DDL that has one form, i only need one method from that form, that's the My_Show method, it takes several parameters, and in the end it simple calls the ShowDialog.
The form is working like a normal form, i need to create an instance of it before calling the My_Show method. It works but it's not very useful... So I was thinking, how can I the form in the same way of the Message Box class.
How can I do that? Shared/static My_Show method? But to do this, how do I instantiate the class? Do i really need to instantiate the class, or just set all properties, methods to shared?
Never done anything like this
Thanks
Re: Initialize Class Inside Shared Method
Since it's a DLL, why not move the Shared method into a module? You can then create an instance (if there isn't one already) and show it from the method. Technically, you could do the same thing in a shared method of the class, as what you would end up with would be like a Singleton form.
Re: Initialize Class Inside Shared Method
Thanks
Didn't remember of the first solution...
Just went to the singleton Form. :)
Thanks