Charles,
Is there a better way?
Lots of them. One way is to refactor your code. Code that should
execute only after the Action handler has executed is best moved
into a method that can be called from the event handler.
But, two things complicate that. First, the user can cancel the
login, so the dialog can disappear with either a successful or
unsuccessful login. Second, the login can be called from multiple
areas of the software, and the additional code should only happen in
one. So, sometimes the code that calls the login looks like this:
dim l as new LoginWindow
l.show
// Do some stuff
And other times it looks like this:
dim l as new LoginWindow
l.show
// Do different stuff
And sometimes nothing happens from the calling method.
Regardless of which form the call is taking, I don't want anything to
happen until the user has either clicked OK and the login was
successful, clicked OK and the login was unsuccessful, or clicked
Cancel. What will happen at that point, however, is different
depending on which method is displaying the login.
I want what a MessageDialog does. When I call
MessageDialog.ShowModal, the user can't do anything and the program
doesn't do anything until a selection is made and a button is returned.
Thanks,
Chuck Ross
_______________________________________________
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>