Solved

MDI Form Problem

Posted on 2002-07-13
16
205 Views
Last Modified: 2010-08-05
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?
0
Comment
Question by:sk33v3
  • 6
  • 4
  • 3
  • +2
16 Comments
 
LVL 3

Expert Comment

by:ketapillar
ID: 7151545
Try setting the forms location off of the screen...

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

0
 
LVL 3

Expert Comment

by:SirNick
ID: 7151558
Hello sk33v3

Your splash screen isn't one of the MDI's child forms is it?
0
 
LVL 3

Expert Comment

by:SirNick
ID: 7151562
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.
0
 
LVL 9

Author Comment

by:sk33v3
ID: 7151576
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?
0
 
LVL 3

Expert Comment

by:ketapillar
ID: 7151578
I don't think you can set coordinates on a maximized form... (Why is a spash screen maximized?)  But I could be wrong.
0
 
LVL 3

Expert Comment

by:SirNick
ID: 7151581
Try changing the autoshow property to false
0
 
LVL 3

Expert Comment

by:SirNick
ID: 7151584
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
0
 
LVL 3

Expert Comment

by:SirNick
ID: 7151586
And when you want it to become visible use

MDIForm1.Visible = true
Form1.Visible = true
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 9

Author Comment

by:sk33v3
ID: 7151610
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?
0
 
LVL 9

Author Comment

by:sk33v3
ID: 7151612
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.
0
 
LVL 3

Expert Comment

by:ketapillar
ID: 7151615
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
0
 
LVL 9

Author Comment

by:sk33v3
ID: 7151623
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?
0
 
LVL 3

Expert Comment

by:SirNick
ID: 7152160
What code have you got for your splash screen
0
 

Accepted Solution

by:
ComTech earned 0 total points
ID: 7195948
This question will be placed in PAQ, and points refunded.

Regards,

ComTech
Community Support Administrator  
Experts-Exchange  
0
 
LVL 4

Expert Comment

by:jmfairchild
ID: 8112018
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:

http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20546430.html
0
 
LVL 4

Expert Comment

by:jmfairchild
ID: 8112027
The above should read "...You CAN'T set the form's borderstyle or any other border-type property at run-time..."

- Jim
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now