vnarod Posted April 23, 2003 Posted April 23, 2003 I click on a report name and report starts loading. I need to display a splash window that says "Loading Report". The problem is that it all happens within MDI form. If I make splash window a child then it is not positioned correctly and appears maximized if other forms are maximized. If I don't make it a child, then I have to use ShowDialog and that blocks the execution. What is the proper way to do it? Quote
hog Posted April 23, 2003 Posted April 23, 2003 Create a normal form for your splash form and add a timer to it for however long you want it to stay visible for. When the timer is up close the form Quote My website
*Experts* Nerseus Posted April 23, 2003 *Experts* Posted April 23, 2003 I'd hate to use a timer since the timer may not be long enough or may be too long. You can show a form that's not a child and not make it modal. You'll want to set some properties on your splash form, though, to keep it on top so that it doesn't get hidden. Just playing around, I tried the following settings for the splash form and they worked quite well: ControlBox = false FormBorderStyle = FixedToolWindow TopMost = true Caption = - well, no caption - just clear the text When you want to show the form, just create a new instance and call .Show(). You can often do this in the constructor of a large form that you're loading and then close the splash form when the main form (or report form) is activated. -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
vnarod Posted April 23, 2003 Author Posted April 23, 2003 I weird thing is happening. Dim fmLoading As New frmLoading() fmLoading.Show() I am getting an "Object reference not set to an instance of af an object" error on .Show line. If I change it to ShowDialog - no error. Any thoughts? Quote
*Experts* Nerseus Posted April 23, 2003 *Experts* Posted April 23, 2003 By itself, it looks fine. Is there anything in the Form's Load event that might be causing it? -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
vnarod Posted April 25, 2003 Author Posted April 25, 2003 There is no code in the form at all - it is just a splash window. Besides, why would ShowDIalog work and Show not? Quote
*Experts* jfackler Posted April 25, 2003 *Experts* Posted April 25, 2003 The show dialog stops further processing until the showdialog is dismissed. Something in your code is erroring beyond the show statement. Probably trying to access the object after it has been closed. Try commenting out the code that closes the splash and see if it errors. Jon Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.