On 28-Apr-08, at 4:46 PM, David Stein wrote:
> In a KeyDown event, I want to call a method which will close the
> current window (Window1) and display another window (Window2). When I
> try to implement this, I get a NilObjectException. I think the
> problem is that my NextWindow method is called and then the code in
> the KeyDown event handler keeps executing. In the following example,
> if i=6 I don't ever want to see the "Got here." MsgBox. I may be
> using the term incorrectly, but what I think I need is a way to call a
> method synchronously. Can anyone help?
>
> David
>
> in the KeyDown event handler for Window1:
>
> If i = 6
> NextWindow
> End If
> MsgBox "Got here."
> i = i + 1
>
> The NextWindow method:
>
> Window2.Visible=True
> Window1.Close
And well it should keep executing
Close is not a means to leave this method immediately
But a return is
If i = 6
NextWindow
RETURN
End If
MsgBox "Got here."
i = i + 1
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|