section.echo
07-21-2011, 10:53 PM
My problem is I have a program that on "some" computers it will display fine, and on some others it chops off the bottom buttons so you have to use the scrollbar to see them, but on some computers it displays it all.. I thought it would be a resolution issue, but I installed on two computers, with exactly the same video cards, and the EXACT same monitors, at the same resolution and one displays properly and one doe's not. The program is still fully functional but on some clients computers you have to use the scrollbar the whole time to get to the bottom of a form and sometimes you dont..but I tried it with the same computers, os's, video cards, resolutions, monitors..everything..and they still differ between computers..I am installing access runtime on clients computers (2003 SP3)....
Like I said, it is multi-os..sometimes the client will have XP and it will display fine..sometimes they will have windows 7 64bit Ultimate and it will display fine..and sometimes they will have XP and it wont..Windows 7 and it wont..so it's kinda messin' with my head!!..Any help will be GREATLY appreciated!!!
SOMEONE PLEASE HELP!!
dicepackage
07-26-2011, 06:11 AM
This doesn't directly answer your question but it may serve as a workaround. I had limited space inside the access window for my application. It was made worse by multiple users running at low resolutions. To combat this I had the form popup out of access by setting the Form properties Popup variable to Yes. I didn't like that Access would still open in the background and while I wasn't able to remove it I could resize it as small as possible to place it out of the way. To do this I added the code below in a new module.
Private Type Rect
x1 As Long
y1 As Long
x2 As Long
y2 As Long
End Type
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, r As Rect) As Long
Private Declare Function IsZoomed Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function MoveWindow Lib "user32" (ByVal hwnd As Long, ByVal X As Long, ByVal Y As Long, ByVal dx As Long, ByVal dy As Long, ByVal fRepaint As Long) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Sub SizeAccess(ByVal dx As Long, ByVal dy As Long)
'Set size of Access and center on Desktop
Const SW_RESTORE As Long = 9
Dim h As Long
Dim r As Rect
On Error Resume Next
h = Application.hWndAccessApp
'If maximised, restore
If (IsZoomed(h)) Then ShowWindow h, SW_RESTORE
'Get available Desktop size
GetWindowRect GetDesktopWindow(), r
If ((r.x2 - r.x1) - dx) < 0 Or ((r.y2 - r.y1) - dy) < 0 Then
'Desktop smaller than requested size
'so size to Desktop
MoveWindow h, r.x1, r.y1, r.x2, r.y2, True
Else
'Adjust to requested size and center
MoveWindow h, _
r.x1 + ((r.x2 - r.x1) - dx) \ 2, _
r.y1 + ((r.y2 - r.y1) - dy) \ 2, _
dx, dy, True
End If
End Sub
And in the Form's load event procedure I added this:
SizeAccess 20, 20
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.