Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

MDI Form Problem

Posted on 2002-07-13
16
Medium Priority
?
217 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Suggested Courses

650 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