how to restrict appearance of child forms
-
Hi there How can i restrict the appearance of child forms? i only want 1 instance of a particular child form how do i do that? VisionTec
visiontec wrote: How can i restrict the appearance of child forms? This is ambiguous. Appearance in this context could mean the number of times it appears or the way it looks. visiontec wrote: i only want 1 instance of a particular child form how do i do that? Apply the singleton pattern to it. Actually, I'm not too sure whether that is completely wise or not in the context of a form. If your not already aware, a "singleton" is a class that only ever has one instance in existance at any time (some more strickter definitions might even say only one instance ever). This is acomplished by making the constructor private, creating static field of the class type and creating a static method that creates the one and only instance or returns the existing instance. If you need to know more about singletons just ask and I, or someone else, will help you out.
EuroCPian Spring 2004 Get Together[^] "You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar "Get in touch with your Inner Capitalist - I wish you much success!" -- Christopher Duncan, Lounge 9-Feb-2004