Questions regarding SetWindowPos api Function

buratti

Registered User.
Local time
Today, 07:32
Joined
Jul 8, 2009
Messages
234
I am using the SetWindowPos API function on startup of my database to, well basically resize and position my database window on my screen. Everything is working pretty well with it, but I have 2 exceptions...

First, I guess it's kinda built into the function, but after running the function I cannot resize my DB window. I can maxamize or minimize the window, but am locked out of resizing the window to a different size. Is there any way to remove the resize "lockout" when using the function, BUT all along keeping the resizing and positioning that the function preforms? (Remember, I am using it to resize the database window, not any form or report windows.)

Second, I use the function to resize my DB window to a fairly small size (about 2" tall by 6" wide). With this size, whenever I open a report in print preview view, the reports' window size is extremely small ( about 2" square). This only happens with reports in Preview view. Reports in Report view and any/all forms open the correct size and I am able to resize those the regular way if need be.

A little more info... ALL of my forms and reports are set to popup except my main navigational form (the one that opens on startup). I have tried to use the movesize command on open of the reports, but that seems to do nothing.

Any suggestions to be able to resize the main window and open the reports in a larger window??
 
First, which Access version do you use?

The database window is the window which displays the Access objects such as tables and forms etc. Is that what you mean? because you are also mentioning that you want to be able to open the main window (the Access application window?) in a larger window.
So i am a little bit puzzled.

using the move method of the form you can resize and move the form.
using the me.maximize method in your reports OnOpen event and me.Restore in the OnClose/OnUnload event maximizes the report and restores on close.

HTH:D
 
I am using Access 2007, and YES, I am referring to the Access window, at least for the main part of my question. You may have mis-read a part of my question because I dont recall asking how to open the "Main" window in a larger window, but I was asking how to open a Report window in a larger one.

Dont worry about this problem anymore anyway. It appears that half my problem was only when I opened the DB in runtime version. I did a little tweaks like maxamize on open of the report and worked out something that I can live with, although not exactly what I wanted though.

Thanks for your suggestions anyway
 

Users who are viewing this thread

Back
Top Bottom