Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 14th, 2004, 10:55 AM
Authorized User
 
Join Date: Jul 2003
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default Preloading invisible forms

Hi.

I‘m trying to preload some forms with large lists before letting people use the application. What is the best way to preload these forms in application (not to show them).

Thank you.
Pavel


 
Old April 14th, 2004, 11:07 AM
Authorized User
 
Join Date: Jun 2003
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

when opening the app, using either the main sub routine or attached into the load event of the opening form you can pre load your forms by callng load formname

This loads them but they are not visible (unlike formname.show)
you then make them visible with formname.visible = true
Hope this helps

 
Old April 14th, 2004, 01:59 PM
Authorized User
 
Join Date: Jul 2003
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you for the answer.
Unfortunately, my forms are MDIChild forms and they are become immediately visible after Form_Load event.
Any other ideas?

Pavel

 
Old April 14th, 2004, 04:30 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

in the Load event of the mdi child move the form ouside the window
me.left = screen.width
so it is visible, but hidden. To show it, just change the Left property to zero (or whatever)

Marco
 
Old April 15th, 2004, 03:53 AM
Authorized User
 
Join Date: Jun 2003
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Why do your forms become immediately visible. Are showing them in the MDI forms load event?

I have tested a MDIForm with a child form1. set the project startup form to MDIForm in the load event of the MDIForm preload form 1 using load form1

form a menu item i then created a item to form1.show.

This worked perfectly.

Im just intrigued as to why your forms were showing initially.



 
Old April 15th, 2004, 08:42 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there...

yyour mdi probably has the option autoshowchildren in true...

put it false to prevent the auto show of childrens...

HTH

Gonzalo
 
Old April 15th, 2004, 09:07 AM
Authorized User
 
Join Date: Jul 2003
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dear Marco.
Thank you.

It is working perfectly well.

To Byron:
Here is a note from MSDN:
"MDI child forms cannot be hidden, and thus are immediately visible after the Form_Load event procedure ends."
So, until form is loaded it can’t be unvisible.

Pavel






Similar Threads
Thread Thread Starter Forum Replies Last Post
visible/invisible stealthdevil Access VBA 4 December 1st, 2006 05:40 PM
invisible console app asmotritsky Visual C++ 1 November 25th, 2004 03:27 PM
Underscore to be invisible jmaronilla Beginning PHP 2 September 15th, 2004 09:37 AM
Invisible HyperLink acko ASP.NET 1.x and 2.0 Application Design 2 January 19th, 2004 01:00 PM
PivotTable Column won't go Invisible Stoney Excel VBA 0 November 5th, 2003 07:22 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.