On Apr 20, 2006, at 6:46 PM, Keith DeLong wrote:
I'm trying to close a certain Window without knowing if it is open. Of course w.close instantiates the window if it doesn't exist. This basic code works for a specific known window class myWindow: For i as integer = (WindowCount-1) downto 0 if Window(i) isa MyWindow then Window(i).close NextI'd like a generalized function where I could pass any window class andclose it if it is open. Something approximating this: Function CloseWindow (W as Window) For i as integer = (WindowCount-1) downto 0 if Window(i) isa W then Window(i).close Next End Function The problem above is the compiler complains that w is not a class. Is there a solution that I'm missing?
Perhaps; the problem is not entirely clear to me. Is it that you want to close the framework-supplied instance of a window subclass, if open?
Charles Yeomans _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
