Form Sizing

D

Dymondjack

Hello all and thanks in advance.

I'm having some minor issues trying to get some form sizing right. On my
main form, in the Open event is the DoCmd.Maximize code, which works fine,
maximizing the main form.

A link on this main form opens frmDistribute, which I would like opened
without maximizing. So, playing with the AutoResize property and
DoCmd.Maximize & DoCmd.Restore commands, I have not been able to get a result
I am looking for.

Either frmDistribute opens in the maximized state, which I dont want, or it
opens in the restored state, which I do want, though for some the reason the
main form also restores to an un-maximized size.

I have been able to set the focus back to main form and maximize it to get
the end result I want, though the user then sees the forms sizing themselves
for a second or two before its done, which is not what I want. I would think
this wouldn't be that complicated. Has anyone else had a similar issue or
can think of something that I'm missing? Just looking for frmDistribute to
be opened in a restored window size without it effecting the window size of
frmMain.

Any help greatly appreciated.

Thanks
Jack
 
T

Tony Williams

Have you tried putting the Docmd.Restore in the OnOpen event of
frmDistribute?
HTH
Tony
 
D

Dymondjack

..Restore restores the frmDistribute to the right size, without any visual
lag, but it (or something else) also restores the main window, which I need
maximized. Thanks
 
T

Tony Williams

Use .Maximise on the on Open event of the main window? Wouldn't the
combination of both help?
Tony
 
D

Dymondjack

Thanks for the idea Tony, though frmMain_OnOpen already has DoCmd.Maximze.
The problem is, every time I open another form off it, frmMain restores for
some reason I can't find (even though it is already maximized to begin with).
My workaround for this is to set the focus back to the main form, maximize
it (again), then set the focus back to frmDistribute. This works, but looks
like crap with forms resizing themselves everywhere, and professionality is
my biggest motive with this.

Again, thanks for the ideas, but I still haven't found the issue. Somehow
the main form is resizing whenever another form opens, and if I can find out
why, I think I should be able to get it. Any other suggestions are welcome
 
M

MikeB

When I want a form to stay a certain size "no matter what", I put code in the
OnResize event to restore it to that size.
 
S

Stuart McCall

Dymondjack said:
Hello all and thanks in advance.

I'm having some minor issues trying to get some form sizing right. On my
main form, in the Open event is the DoCmd.Maximize code, which works fine,
maximizing the main form.

A link on this main form opens frmDistribute, which I would like opened
without maximizing. So, playing with the AutoResize property and
DoCmd.Maximize & DoCmd.Restore commands, I have not been able to get a
result
I am looking for.

Either frmDistribute opens in the maximized state, which I dont want, or
it
opens in the restored state, which I do want, though for some the reason
the
main form also restores to an un-maximized size.

I have been able to set the focus back to main form and maximize it to get
the end result I want, though the user then sees the forms sizing
themselves
for a second or two before its done, which is not what I want. I would
think
this wouldn't be that complicated. Has anyone else had a similar issue or
can think of something that I'm missing? Just looking for frmDistribute
to
be opened in a restored window size without it effecting the window size
of
frmMain.

Any help greatly appreciated.

Thanks
Jack

One of the rules laid down by MS is that child windows in a 'multiple
document interface' application, such as Access, should all share the same
sizing attributes. So, you maximize one window, they all get maximized. Same
goes for Restore.

The only workaround I know of is to set to Yes/True the popup property of
the form which should be restored. This takes the form's window out of the
child window list.
 
M

Marshall Barton

Dymondjack said:
I'm having some minor issues trying to get some form sizing right. On my
main form, in the Open event is the DoCmd.Maximize code, which works fine,
maximizing the main form.

A link on this main form opens frmDistribute, which I would like opened
without maximizing. So, playing with the AutoResize property and
DoCmd.Maximize & DoCmd.Restore commands, I have not been able to get a result
I am looking for.

Either frmDistribute opens in the maximized state, which I dont want, or it
opens in the restored state, which I do want, though for some the reason the
main form also restores to an un-maximized size.

I have been able to set the focus back to main form and maximize it to get
the end result I want, though the user then sees the forms sizing themselves
for a second or two before its done, which is not what I want. I would think
this wouldn't be that complicated. Has anyone else had a similar issue or
can think of something that I'm missing? Just looking for frmDistribute to
be opened in a restored window size without it effecting the window size of
frmMain.


The Maximize method sort of tells Access to maximize
everthing so you can't have one form maximized and another
that is normal.

There are a couple of exceptions to this "rule". One
exception is that form's opened in dialog mode can not be
resized so they are alway their original size. The same is
true for form's with their PopUp property set to Yes.

You can also get some interesting(?) effects with forms that
have their MinMaxButtons set to None.
 

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