Solved

MDI Form Problem

Posted on 2002-07-13
16
204 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
Comment Utility
Try setting the forms location off of the screen...

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

0
 
LVL 3

Expert Comment

by:SirNick
Comment Utility
Hello sk33v3

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

Expert Comment

by:SirNick
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Try changing the autoshow property to false
0
 
LVL 3

Expert Comment

by:SirNick
Comment Utility
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
Comment Utility
And when you want it to become visible use

MDIForm1.Visible = true
Form1.Visible = true
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 9

Author Comment

by:sk33v3
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
What code have you got for your splash screen
0
 

Accepted Solution

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

Regards,

ComTech
Community Support Administrator  
Experts-Exchange  
0
 
LVL 4

Expert Comment

by:jmfairchild
Comment Utility
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
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

771 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

15 Experts available now in Live!

Get 1:1 Help Now