My Assistant
![]()
Custom Search
|
![]() ![]() |
![]() |
![]() Post#1 | |
![]() Posts: 91 Joined: 19-August 06 From: San Diego, CA ![]() | I realize best practice, in many instances, is to design form size for the smallest, most common screen size at the users' location. So, once the proper form size is determined, both the form size and position can be hard coded in the form's Open Event. Example: Get form dimensions. . . . CODE DEBUG.PRINT Forms!Form1.InsideHeight,Forms!Form1.InsideWidth Set size at form opening. . . . CODE Private Sub Form_Open(Cancel As Integer) (WindowLeft, WindowTop, Width, Height) DoCmd.MoveSize 3440, 1000, 15840, 12240 End Sub However, if once the form is manually sized with both the "Auto Resize" and "Fit to Screen" on the Property Sheet set to "No," and the form is then saved, it seems the form should then always automatically open to the last saved size (the size that was last saved by the programmer before publication). Is it then really necessary, in this instance, to also hard code the form size in the Open Event? |
![]() Post#2 | |
![]() UA Moderator Posts: 76,824 Joined: 19-June 07 From: SunnySandyEggo ![]() | Hmm, can't say this is something I ever had to do. All I do is design a form using the smallest screen size and that's it. If you're trying to rescale the form to fit the entire target screen, then there are code for that, and all you have to hard code is the screen size of the dev machine. -------------------- Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas Access Website | Access Blog | Email |
![]() Post#3 | |
![]() UtterAccess VIP Posts: 1,882 Joined: 4-June 18 From: Somerset, UK ![]() | You could also consider using automatic form resizing where the forms are adjusted for each user's screen size & resolution -------------------- |
![]() Post#4 | |
![]() Posts: 91 Joined: 19-August 06 From: San Diego, CA ![]() | So, do you have "Auto Resize" and "Fit to Screen" on the Property Sheet set to "No" ? And then just save the form without any "docmd.MoveSize" setting in the Form_Open Event? This post has been edited by tjgillis02: Oct 17 2019, 09:08 PM |
![]() Post#5 | |
![]() UA Moderator Posts: 76,824 Joined: 19-June 07 From: SunnySandyEggo ![]() | Hi. Not sure if you're asking me but just to let you know, I use Tabbed Documents instead of Overlapping Windows. -------------------- Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas Access Website | Access Blog | Email |
![]() Post#6 | |
![]() Posts: 91 Joined: 19-August 06 From: San Diego, CA ![]() | Yes, DBGuy. Thanks. I do not use tabbed forms. I use overlapping windows. I have assumed the "safest" display for overlapping windows is "Auto Center" set to "Yes," and "Auto Resize" and "Fit to Screen" set to "No" (in the Property Sheet). This being done because I do not know how Auto Resize and Fit-to-Screen would affect the display of controls in other monitors. And then design for the smallest common screen size. My question, then, is once the form is saved, is it necessary (for any reason) to use the MoveSize command (or InsideHeight / InsideWidth)? |
![]() Post#7 | |
![]() Posts: 91 Joined: 19-August 06 From: San Diego, CA ![]() | Thanks, isladogs. I am also checking out that Website. This post has been edited by tjgillis02: Oct 18 2019, 12:08 AM |
![]() Post#8 | |
![]() UtterAccess VIP Posts: 1,882 Joined: 4-June 18 From: Somerset, UK ![]() | As you are using overlapping windows, automatic form resizing (AFR) should be perfect for your needs. If you find any of the download links missing in that Web article, please let me know by PM. My Web host messed up a load of files so I'm going through restoring those page by page today. ![]() -------------------- |
![]() Post#9 | |
![]() UA Moderator Posts: 76,824 Joined: 19-June 07 From: SunnySandyEggo ![]() | QUOTE My question, then, is once the form is saved, is it necessary (for any reason) to use the MoveSize command (or InsideHeight / InsideWidth)? I would be the wrong person to ask or to answer this question because my answer would be a "no," but that may be because I mostly use Tabbed Documents. But I also use popup forms and those I set to AutoCenter=Yes. Just another tid bit of information, in case it is related, I also don't mess with hiding the Access Shell, so I really don't pay much attention to the placement of forms. Unless, if you are talking about placement of controls on the form on different screen resolutions, then I just use Anchoring for that, but Colin's point about trying out AFR is probably what you're after. Cheers! -------------------- Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas Access Website | Access Blog | Email |
![]() Post#10 | |
![]() UtterAccess VIP Posts: 2,902 Joined: 12-April 07 From: Edmonton, Alberta Canada ![]() | I have for a very long time simply sized the form to what I want, and never had to "adopt" code in the form to deal with this issue. I can say one long time tip I use? Well, change the border to sizable. Flip the form in to view (regular mode - not design). Now size the form exactly the way you want it to look. Now hit ctrl-s. Now flip the form back to design mode, and change the border style back to "thin". This will quite much size + force the form the way you want. Before doing above, I set autosize, and fit to screen = no. So, as a general rule, you should and can be quite safe with the above approach to fix/freeze the form size. Regards, Albert D. Kallal (Access MVP 2003-2017) Edmonton, Alberta Canada |
![]()
Custom Search
|
![]() | Search Top Lo-Fi | 9th December 2019 - 12:50 AM |