Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
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?
Posted
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
My website
  • *Experts*
Posted

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

"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
Posted

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?

  • *Experts*
Posted

By itself, it looks fine. Is there anything in the Form's Load event that might be causing it?

 

-Nerseus

"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
  • *Experts*
Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...