On Apr 6, 2006, at 2:33 PM, Charles Ross wrote:

I have code that looks like this:

// Do some stuff

dim l as LoginWindow
perhaps you mean dim l as new LoginWindow
l.Show

// Do stuff after successful login

The code for checking whether a login is successful is in the Action handler of a button. I don't want the lines of code below l.Show to execute until this handler has executed, as if it were a MsgBox or a MessageDialog. What would be the best way to do this? One idea I had was this:

while l.Visible
  // Do nothing
wend

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.

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>

Reply via email to