On Sunday, December 30, 2001, at 03:36 PM, Kevin Ballard wrote:
On 12/30/01 3:29 PM, "Charles Yeomans" <yeomans at desuetude dot com> wrote:
Yes it does. WindowCount = 0 precisely when there are no windows open.
So the While loop executes if and only if there are windows open.
Yeah, but if a window refuses to close, then the loop will execute
forever.
Bad idea.
That's right. But the point was to answer your question as to why
For...Next loops aren't always appropriate. If you want reliable code
for window-closing, then that requires a different answer.
Hence my Window.Close() feature request.
I saw that. I think you got it backward, in that you'd like
Window.Close to return the negation of the CancelClose event handler.
And I don't think that what you want is to overload the return value,
which you cannot do in RB anyway; I think that Window.Close should
always return a Boolean result. I'd never really considered it before,
but now that you've raised it, it does make better sense for
Window.Close to return a result, given that CancelClose extends the
Close method.
Charles Yeomans
|