I have forms that need to be a minimum size due to the control layout. I control the size in OnResize, but if the form is maximized this doesn't work.
How can I control the main Access form size?
I have forms that need to be a minimum size due to the control layout. I control the size in OnResize, but if the form is maximized this doesn't work.
How can I control the main Access form size?
I don't understand the question.
Are you trying to keep a form minimized regardless of what the user does? Or are you trying to disallow the user from changing the size of the form?
Hi,
- I have forms that need to be a minimum size (they cannot be resized smaller than a certain size)
- when the form is maximized (taking on the size of the application client area), the OnResize doesn't prevent the form from being resized smaller than the minimum size(I am using Me.InsideWidth and Me.InsideHeight to control the form size)
- ultimately, I want to control the OVERALL application size
you didn't really answer the question, just repeated your first post but I will assume you do not want your users resizing your forms.
You can do several things, all in the PROPERTIES of the form in question:
BORDER STYLE default is 'sizable' you can change that to thin or dialog to prevent enlarging by drag and drop
MIN MAX BUTTONS default is 'both enabled' you can set that to NONE to prevent minimizing/maximizing the form
These are the items directly related to the size of the form, there are bunch of others that may help also depending on the function of the form.
First, you did not understand my original question, so I gave more info about the original question. How you came to the conclusion about I was talking about minimised form I do now know. I am not sure if this is a language issue.
Let me try again:
- acForm needs to be a minimum size, but the user can resize the form ( I handle this correctly when form is not maximized )
- when the acForm (not the application as a whole) is maximised (and this feature needs to be enabled), I need to control the ENTIRE APPLICATION size to ensure the inner form has maintained its minimum "Inner" size
hope that helps
I haven't got a clue what you're asking if I didn't answer it.
Maybe if you create a sample database with some junk data in it I might be able to get a better idea of what you're asking because I'm totally stumped right now
If you are talking about the 'size' of the entire application being the total disk space it takes the only thing you can do to control that is to compact/repair on close, but as far as I know you can't limit the physical memory required to store a database in access short of a lot of code and reminders that the database is getting larger than what you want it to be.
when you say:
- acForm needs to be a minimum size ( I handler this corretly when form is not maximized)
I think to myself 'he doesn't want the dimensions of the form to change', thus the BORDER STYLE property THIN to prevent it from being resized
when you say:
- when the acForm (not the application as a whole) is maximised (and this need to be enabled) I need to control the ENTIRE APPLICATION size to ensure the inner form has maintained it minimum size
if you are talking about disallowing the user from modifying the size of the Access application window so that they can not make it smaller than the minimum size of your form I don't think it can be done.
The Application window will always have precedence over the size of the window.
At first I was thinking you are just trolling, but it seems you did not see my edits.
If I cannot control/resize the application window programmatically, I will probably just try to hide or minimize the the form and prompt the user to make the application window larger until it meets the minimum requirements.
When I get a chance, I am going to try what is discussed there: http://www.access-programmers.co.uk/...d.php?t=118486