> 1. In the application's open event, change Splash.ShowModal to > Splash.Show and remove Window1.Show. > > 2. Add Window1.Show to the close event of the Splash window. > > 3. Change Window1's Pushbutton Action event to Window1.Show so the > keydown event of the Splash window is enabled.
I've found that showing modal windows is best done using a push/pop queue and a timer control. It avoids problems that can happen when interrupting window-building or other program initialization events. When I need a modal window opened, but I want the application to otherwise continue initializing and showing its splash window, I push a variable onto a queue I maintain (a simple one-dimensional array). The timer control fires during null events, at which time I have a method that checks the queue, sees there's a variable there that means "open this window", clears the entry from the queue array, and then opens the window (modal or not). I use this for my applications where I want to show my splash window, but I subsequently need to prompt the user for registration info if they haven't already entered it - before I let them proceed to the main part of the program. It works for both regular windows and modal ones, although because modal windows interrupt program flow, I generally need to split up my program code into things that happen before the modal window opens and things that happen in response to the user dismissing the modal window. Just my way of working, of course - - John _______________________________________________ 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>
