Form is maximized on opening

G

Guest

Hello,

I open a form through a cmd.OpenForm command triggered by the key down event
of another form then something strange happened. The first time I trigger the
key down command, the form is opened and maximized, when then I close the
form every other time is reopened it’s stays the normal size is designed.
I don’t know if it’s important, the form has I Word document page inserted.
Can you explain why at the first time the form is maximized although it
shouldn’t?

Thank you
GL
 
V

Van T. Dinh

IIRC, unless you maximise or restore it by code during the form-opening
process, the Form will be opened with the same window-mode as the previously
active data object. Thus, if you have Form1 as the active Form in maximised
state and you open Form2, Form2 will be opened in maximised state. If Form1
is in the restored state, Form2 will be opened in restored state.

I normally don't rely on the window-state of the previously active Form and
use the Form_Activate Event to maximise or restore the required Form as
needed.
 

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