I'm trying to place the help forms precisely in the window, so I am using the movesize command. It doesn't seem to be having any affect on the form placement.
I'm trying to place the help forms precisely in the window, so I am using the movesize command. It doesn't seem to be having any affect on the form placement.
probably due to your code either being wrong or not firing for any number of reasons
perhaps if you provided your code we could help to work out what the problem is
Here's the code
Private Sub Form_Open(Cancel As Integer)
'SS_OnOpen Me
DoCmd.MoveSize 8500, 3000
' Set the fonts
Me.Title.FontName = strReleaseFontName
Me.Text1.FontName = strReleaseFontName
End Sub
The numbers are in twips (20th's of pixels), so the upper left corner should be displaying at approx 425 pixels (5.9 inches) from the left edge and 150 pixels (2 inches) from the top. Instead it is 3 inches from the left and 2 inches from the top. Also, it doesn't move when I change the number of twips.
Since you dont appear to be re-sizing the form couldn't you just use Me.Move 8500,3000 ?
If this helped, please click the star * at the bottom left and add to my reputation- Thanks
Yes, it is a popup, but I am running it in full screen mode. I am using MoveSize only because that's what I have always used. I'll try me.move next.
That does not make sense since you said 'Instead it is 3 inches from the left and 2 inches from the top.'. Full screen mode means it takes up the whole screen.Yes, it is a popup, but I am running it in full screen mode.
Also worth clarifying what '3 inches from the left and 2 inches from the top' means - left and top of what? the monitor, the access window? a form?
The form that I did the MoveSize to ended up 3 inches from the left and 2 inches from the top of the screen because I have Access in full screen mode. I don't have the form in full screen mode, just Access.
movesize affects the active window - see this link
https://github.com/MicrosoftDocs/VBA...md.MoveSize.md
when a form is opened it is not necessarily the active window until the activate event
see this link about order of events
https://support.microsoft.com/en-us/...86553682f9#bm3
perhaps try one or more of the following:
1. moving your code to the form activate event
2. opening the form as acDialog which may set the focus (and therefore the active status) sooner
3. use the move property as suggested by moke123
As an aside there are 15 twips to a pixel, 1440 twips to an inch and 72 pixels to an inch. So if you want 5.9 inches (exactly) that is 8496 twips which does not resolve to an exact number of pixels - you need a value of 8490 or 8505. I doubt it really matters in this case, but something you may want to be aware of
Thank-you CJ. That was very helpful!