Page 2 of 2 FirstFirst 12
Results 16 to 26 of 26
  1. #16
    Miles R is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Mar 2019
    Posts
    280
    Colin,

    I think I might see what is going on here - we could both be right.
    On my database, the first form is just a maximized form and the second is a Popup with a sizable border. The adjustments I need to make to the positions to get the popup to align exactly where I want it on the main form are -150 horizontal and -15 Vertical.
    You are dealing with two popups which have both a top and bottom invisible border (if border not None). Perhaps the vertical invisible border is larger at the bottom than the top.
    So, in getting the second form to appear exactly below the first, you have to take into account the size of the invisible border at the bottom of the first and the invisible border at the top of the second.
    I don't have to take into account the bottom border of the first form as the popup is wholly within the boundary of the first main maximized form.



    So, I'm suggesting the invisible border of at the top of popups is 15 TWIPS and probably around 135 or 105 TWIPS at the bottom.

    It's a pity it's not documented exactly somewhere.

  2. #17
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    No. My example had every possible combination of popup and standard forms.
    I'm using overlapping windows display. No maximised forms.

    I thought you wanted the second form to be below the first but that's clearly impossible if that is maximised or you are using tabbed documents display.
    I don't understand where you want the second form to appear.
    Perhaps you could upload a simple example to illustrate what you mean.

    I'd be very surprised if the form window has an effective border width that is different at the top/bottom.
    However it would be easy to test by moving the second form to be shown directly above the first or exactly aligned with the first
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  3. #18
    Miles R is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Mar 2019
    Posts
    280
    Sorry, Colin but I thought it was pretty clear what I wanted, which I have done by setting the popop -150 left and -15 from top.

    As I stated, I wanted the popup to be exactly located on top of an item on my main form - not below the main form - as shown on the first image I posted.
    So I have am item on the main form - an image box actually that has lets says Left pos = X TWIPS from left of frame, and Top pos = y TWIPS from the top of the frame.
    I want the popup to align exactly with the top left of the image box.
    To do this, I set its left coordinate to x - 150 and its top coordinate to y -15. This works perfectly on my database forms.

    I can only conclude that the invisible top margin of popups with sizeable, thin or dialog borders do have an effective border height different at the top and the bottom.

    As I said, it would be nice to find some Microsoft documentation that explicitly defines what these value should be.

  4. #19
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Your screenshot wasn't that clear to me or I wouldn't have spent/wasted a lot of time doing all those tests.
    In fact you hadn't stated that the first form was maximized by being a tabbed document display.
    Obvious to you but not to me.
    Likewise you're now talking about image boxes for the first time ....Why?

    Anyway, I disagree with your conclusion.
    In your case, the vertical displacement is a feature of the tabbed document display NOT the form border.
    The bottom of the tab 'projects' a very small distance (15 twips = 1/96 inch!) below the top of the form

    Click image for larger version. 

Name:	Capture1.PNG 
Views:	14 
Size:	12.5 KB 
ID:	47489
    Therefore the second form aligns with the bottom of the tab without your 15 twips correction

    To confirm that point , untick Display Document Tabs in Access Options
    You will see that the -15 twips shift is no longer needed

    In the end, the main thing is that you have a result that works for you.

    Good luck with the rest of your project
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  5. #20
    Miles R is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Mar 2019
    Posts
    280
    Colin, thanks for your reply again. It has been very useful to me in understanding exactly what is going on with the position of popup forms, even though its taken a long time to get there.

    One final post before I sign off on this one.
    I take your point about the 15 TWIP vertical displacement being due to the tab control rather the popup border. Didn't realize that.

    So I now conclude that for popup forms, the size of the invisible borders are as follows (all in TWIPS) :

    Border Type Left Right Top Bottom
    None 0 0 0 0
    Sizeable 150 150 0 150
    Thin 120 120 0 120
    Dialog 120 120 0 120

  6. #21
    Miles R is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Mar 2019
    Posts
    280
    I have confirmed the vertical invisible borders by subtracting the difference between WindowsHeight and InsideHeight and Subtracting 495 for the Form Title for Sizeable
    These apply for Overlapping, Tabbed with tab showing and Tabbed without tab showing.

    Border Style None - Difference between WindowsHeight and InsideHeight = 0 - conclude top border = 0, bottom border = 0
    Border Style Sizeable - Difference between WindowsHeight and InsideHeight + Title Height = 150 - conclude top border = 0, bottom border = 150

    I think the Form Title for Dialog and Thin is slightly smaller at 465 TWIPS or 31 Pixels.
    Border Style Dialog - Difference between WindowsHeight and InsideHeight + Title Height = 120 - conclude top border = 0, bottom border = 120
    Border Style Thin - Difference between WindowsHeight and InsideHeight + Title Height = 120 - conclude top border = 0, bottom border = 120

    For positioning the top, I subtract 15 TWIPS to get the pop-up to look like it aligns properly. This is probably just a personal preference though.

    Of course, for positioning purposes, the bottom border doesn't matter as you can't see it anyway. It is only the Left border that matters if trying to position a form on top of something else on another form.
    Last edited by Miles R; 03-21-2022 at 07:40 AM. Reason: Got it wrong again

  7. #22
    Miles R is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Mar 2019
    Posts
    280
    I have attached an image of a quick test database I knocked up showing all four types of popup on a Maximized main form using Overlapping windows. I get exactly the same results on Tabbed windows though (tabs showing or not).

    Even the popup with border set to None requires an adjustment of -15 to both top and left as you can just see the underlying rectangle. Not sure why the WindowHeight is slightly less than the InsideHeight in this case though.

    Click image for larger version. 

Name:	Capture.JPG 
Views:	10 
Size:	98.4 KB 
ID:	47496

  8. #23
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Not sure why the WindowHeight is slightly less than the InsideHeight in this case though.
    It isn't less!
    Perhaps you meant that the WindowHeight is 15 twips (1px) less than the WindowWidth. Similarly for the InsideHeight & InsideWidth
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  9. #24
    Miles R is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Mar 2019
    Posts
    280
    I meant to say that the Window Height and Inside Height of 5745 are less than the Design Mode height for the Detail Section of 5760 TWIPS as shown at the top of the Popup with No Border.
    This seems strange that it can be less than the size that it is specified at design time of 4". I am sure there must be a good explanation.

    P.s. I am pretty certain that all Popups apart from Border = None do have an invisible border at the top of 15 TWIPS as shown in my examples.

  10. #25
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Why is that strange?
    The 'missing' 15 twips would appear to be the 'top border' that you keep referring to.
    You can test the no border example by specifying its top position as 0

    Suggest you also repeat all the final tests using a standard non-popup form.
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  11. #26
    Miles R is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Mar 2019
    Posts
    280
    Deleted post
    Last edited by Miles R; 03-21-2022 at 07:59 PM. Reason: Additional info

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 03-09-2017, 07:40 AM
  2. Passing form Left and Top positioning coordinates
    By GraeagleBill in forum Programming
    Replies: 7
    Last Post: 11-18-2013, 08:12 AM
  3. Replies: 15
    Last Post: 12-10-2012, 06:37 PM
  4. Help Needed Form Positioning
    By codybecker in forum Forms
    Replies: 3
    Last Post: 09-15-2010, 08:50 PM
  5. form positioning
    By taylorosso in forum Forms
    Replies: 5
    Last Post: 08-23-2009, 08:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums