I was talking about a form window this time, so I guess
we're even on who misunderstood who ;-)
Think about it though, if you remove (hide) the minimize
button, the form's window can no longer be manipulated and
thus can not be maximized either. Play with the form's
MinMaxButtons property (and what happens to another open,
maximized form when you select one or the other (using the
Window menu). There's actually a subtly useful trick here.
Bottom line, if you want a form to be sized as if it were
maximized, you first have to use API calls to manuplate the
Access window to the desired size and/or retrieve the size
of the Access window. Then, you can use the MoveSize method
to make the form large enough to fill the Access window
wihout maximizing it. Personally, I have never wanted to
take control the user's system so they can not do the same
things with my apps that they can do with other standard
programs. While I have never worked out the APIs necessary,
I am sure someone has and Google should find some examples.
--
Marsh
MVP [MS Access]
Thanks for replying. Don't think we're communicating here...
I'm not refering to Access window, but to a form that opens within the grey
background database window, under the Access menu and command buttons.
In the Load and Activate events of that form ("Main") I placed
DoCmd.Maximize so that it fills the Access database window and automatically
re-maximizes if a different form or report is opened from it, then closed.
This works fine.
When Main is maximized, however, a little grey "restore" icon appears just
above the opened form on the right side of the screen. That's the one I want
to nuke so that the user can't mess with how it's displayed.
PS: I'll play with your reply to my other question. Looks like it should
work, though.