DoCmd.Maximize and Center

Z

Z

Is there anyway to have a windows "DoCmd.Maximize" on load, and also
have the form that its maxamizing center withing the window? For
example if my "form is 4"x4" instead of the 4"x4" block appearing in
the upper left hand corner when its loaded and maximized, its in the
center of the screen and the window is still maximized? or must i
position it manually in the design view?

Z
 
G

Guest

Create a macro named Autoexec and the first action to open your form. The
next action Maximise.
 
A

AL FINK

you can also add a docmd.maximise on the active event of your form. then add
code to center your form
 
L

Larry Kahm

An alternative way of doing this if this is not the first window in your
application is to create a macro called Maximize. The only command it should
have is the command Maximize. Now, include the macro name in the form's On
Load property.

Larry
 
V

Van T. Dinh

My guess is that you want to have the Access Application window to be just
bigger than 4 " x 4 " and centred in the middle of the computer screen and
your Form in maximized inside the Access Application window.

If this is the case, you need to use the function hWndAccessApp() to get the
handle of the Access Application window and then use WinAPI with the handle
to resize and move the Access Application window as required.

Unfortunately, I don't have the Win32 API manual at present but if you are
familiar with Win API, all you need from Access is the handle and some Win
API codes.
 
Z

Z

well i have a switchboard and basically every window including the
switch board i would like maximized and the context within the window
centered and the window maximized. Not to fimilar with WinAPI or the
hWndAccessApp() I will do research into that. thank you everyone

Z
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top