Link to home
Start Free TrialLog in
Avatar of sk33v3
sk33v3

asked on

MDI Form Problem

Here's my Problem. I am trying to load a MDI form while my splash screen is up. Well what happens is that the form shows up visible and i don't want it to i have already tried the visible=false and that didn't work anyone got any good ideas?
Avatar of ketapillar
ketapillar

Try setting the forms location off of the screen...

Me.Left = -10000
Me.Top = -10000

Hello sk33v3

Your splash screen isn't one of the MDI's child forms is it?
How big is the splash screen, for example if it is large enough you could have the MDI form load up behind the splash screen out of sight from the user.
Avatar of sk33v3

ASKER

welll the splash screen is not an MDIchild form. the splash screen is pretty small it just is big enough for us to put out logo on. Can you set the top and left properties on a maximized form to coordinates like that?
I don't think you can set coordinates on a maximized form... (Why is a spash screen maximized?)  But I could be wrong.
Try changing the autoshow property to false
Sorry 'AutoShowChildren' to false and then in the code you need to make sure that no children forms try loading.  For example put something like

Private Sub MDIForm_Load()
    Form1.Visible = False
    MDIForm1.Visible = False
End Sub
And when you want it to become visible use

MDIForm1.Visible = true
Form1.Visible = true
Avatar of sk33v3

ASKER

welll the splash screen is not an MDIchild form. the splash screen is pretty small it just is big enough for us to put out logo on. Can you set the top and left properties on a maximized form to coordinates like that?
Avatar of sk33v3

ASKER

No using the mdiform1.visible-false didn't work and i already have the autoshowchildren set to false. my problem is that the splash screen is not an mdichild and i am trying to get the mdiform to load in the background where the user can't see it becuase i don't want the user to see the MDIform when it is loading i just want them to see my small splash screen 600x300 pixels or there abouts.
Try this...

in the MDIForm_Load

Dim fSplash As frmSplash

Me.StartUpPosition = 0 'Changing to manual
Me.Top = -10000
Me.Left = -10000

fSplash.StartupPosition = 2 'Center Screen
fSplash.Show

.... The rest of the code...
.... The point where you want the Splash to hide (In the forms code...

Unload fSplash
Me.Top = 0
Me.Left = 0
Me.StartUpPosition = 3 'Maximized
Avatar of sk33v3

ASKER

Well using .startupposition just gave me errors and then i tried to use windowstate and it still didn't work. the MDIform right now with the values you gave shows the mdiform centered on the screen wierd huh?
What code have you got for your splash screen
ASKER CERTIFIED SOLUTION
Avatar of ComTech
ComTech

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I had a similar problem with an MDI form. I loaded the MDI Form at startup, and needed to 'load' all the child forms to execute their code since I had other controls on the MDI Form that were 'mirrored' from the child forms. (The child forms had more details to set/select from, but I had a toolbar which could remain loaded without taking up all the room on the MDI Form that the individual windows would take up).

Anyway, no matter how I loaded the child forms, they would always "flash" on the screen as the application loaded. I tried setting the height/width properties to zero, but the titlebar would flash. You can set the form's borderstyle or any other border-type property at run-time, so that was out. To make a long story short, setting the .left and .top properties to negative values did the trick. Neat idea I hadn't thought of.

I don't know why it didn't work out for sk33v3, but it worked for me. So I would like to offer ketapillar 100 points for his solution. I don't know if he still frequents this board, but the points are at question:

https://www.experts-exchange.com/questions/20546430/Points-for-ketapillar.html
The above should read "...You CAN'T set the form's borderstyle or any other border-type property at run-time..."

- Jim