Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Maximize, Restore, and Minimize mode of a form --- how to manage?


Message #1 by "Tom Carnahan" <tcarnahan@c...> on Fri, 22 Nov 2002 04:31:16
I have an MS-Access form that opens in the "Maximized" mode. From that 
form, I have a "shortcut" menu/toolbar that comes up when you right-click. 
The options on the menu include several other forms and reports. When I 
invoke one of these options, the opening form or report hides the Main 
form.  When I close the form or report, I have it unhide the Main form 
before closing.  The problem is that when I turn Echo back on, my main 
form is in the "Restore" mode instead of staying maximized. 

I have tried to control this unwanted behavior by having the form that is 
closing do the following:


	Application.Echo False
	
	MyMainForm.Visible = True

	DoCmd.Maximize

	Application.Echo True

This did not fix my problem. Then I wondered if the .Maximize method 
worked as a "toggle" ... that maybe my form really was maximized and when 
I invoked the DoCmd.Maximize, it was in fact switching my Main form to the 
Restore mode.

QUESTION:

	1) Is there something obvious that I am overlooking?  (For 
example, the methodology or sequence of how focus is transferred or how 
the .Maximize method works?)

	2) Is there a way, either within Access or via a Windows API, 
whereby, I can test to see if a form (either hidden or unhidden but behind 
a non-refreshed screen) is in Maximize, Restore, or Minimized modes? 

Thank you ahead of time for your assistance?  ---- Tom 
Message #2 by "bwarehouse" <bwarehouse@y...> on Fri, 22 Nov 2002 04:03:19 -0700
Sounds like the auto resize in the form's properties is set to yes..  make
sure you set it to no..   and while in design view,
Maximize your form and save it..   now when you open it up, it will be the
size that you saved it..

Later,
b.ware

-----Original Message-----
From: Tom Carnahan [mailto:tcarnahan@c...]
Sent: Friday, November 22, 2002 4:31 AM
To: Access
Subject: [access] Maximize, Restore, and Minimize mode of a form --- how to
manage?


I have an MS-Access form that opens in the "Maximized" mode. From that
form, I have a "shortcut" menu/toolbar that comes up when you right-click.
The options on the menu include several other forms and reports. When I
invoke one of these options, the opening form or report hides the Main
form.  When I close the form or report, I have it unhide the Main form
before closing.  The problem is that when I turn Echo back on, my main
form is in the "Restore" mode instead of staying maximized.

I have tried to control this unwanted behavior by having the form that is
closing do the following:


        Application.Echo False

        MyMainForm.Visible = True

        DoCmd.Maximize

        Application.Echo True

This did not fix my problem. Then I wondered if the .Maximize method
worked as a "toggle" ... that maybe my form really was maximized and when
I invoked the DoCmd.Maximize, it was in fact switching my Main form to the
Restore mode.

QUESTION:

        1) Is there something obvious that I am overlooking?  (For
example, the methodology or sequence of how focus is transferred or how
the .Maximize method works?)

        2) Is there a way, either within Access or via a Windows API,
whereby, I can test to see if a form (either hidden or unhidden but behind
a non-refreshed screen) is in Maximize, Restore, or Minimized modes?

Thank you ahead of time for your assistance?  ---- Tom



  Return to Index