Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide preloading forms - Acc97

Status
Not open for further replies.

tonyflavell

Programmer
Jul 21, 2001
119
GB
I wish to preload and hide 6 forms at startup either before the application main menu appears, or in the background with the application main menu displayed.

I can't seem to achieve this without a great deal of annoying screen activity. The forms are seen to load and then disappear (with flashes of the background in between.

I have tried the following (amongst more exotic solutions)

1) Using - 'acHidden' switch.
2) Using - Forms!fmMenu2.visible = false.
3) Using - application.echo false.
4) Using - screenupdating = false.
5) Loading the main menu before the other forms and keeping it active.

Somebody must know a solution, please pass it on!

Tony
 
Hi

Have you tried Me.Visible = False in the Form_Load event?
Then use the GetFocus and LoseFocus events to toggle the visible property.

John


John Barnett
--
Please consider awarding me a star if you feel my posting has been useful. Thank you.
 
Hi John

Thanks for trying to help, I have tried everything.

However all was answered by a well hidden Microsoft document - Article ID: Q149930 entitled "Maximized Forms First Appear as Restored" which offers a code solution whilst admitting that this is a problem in Access 7.0 and Access 97. They are researching t........blah, blah, blah.

Once again, thanks

Tony
 
Hi Tony

How recent is the article? MS have discontinued new support for the Office 97 family applications as of end of last year, and presumably the 95 family also.

John
 
Last revised 25/06/2002 but they have shortened the document and offer no solution, presumably meaning that they never solved the original bug.

The work-around is to simulate maximising the form by sizing it as large as posible in a resored state. The code offered in Article: Q147152, restores the form, then moves the form to the upper-left corner of the Access client area window and then sizes it as large as possible to fit the client window.

It works well. If you call the function in the onOpen and onResize events the form is locked on the screen and cannot be resized, minimized or maximized by the user.

Tony
 
without actually having tried myself, consider using Application.Echo False

 
P.S. don't forget to turn it back on when you're done losing forms.

For real fun, test application.echo false in your debug window.

To recover, you have to type application.echo true <ENTER> 'blindly'.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top