Access Main Window Resize

Matthys

Registered User.
Local time
Tomorrow, 01:16
Joined
Mar 10, 2006
Messages
11
I'm working on an MS Access app.

The clients use this app with their monitor resolution set to 800 x 600.
Whenever I edit a form I need to set my screen resolution to 800 x 600 to make sure the form is within bounds.:mad:

I wan't a fast way to set the Main Access Window's size too 800 x 600 pixels.

Application.DoCmd.MoveSize(,,800,600) is supposed to work but I get a syntax error.

Any ideas?:confused:
 
In the on open event of the form use the following code

DoCmd.MoveSize(,,800,600)

(when I tried it the form was very small just increase the numbers until you reach the required size)
 
Thanx, but that only resized my form, I want to resize the Microsoft Access Window
 
Solution

Hidden in this post lies the answer!
http://www.access-programmers.co.uk/forums/showthread.php?t=81228

Thanx Rich!

Kinda complicated for me but it does the job.



Rich said:
Option Compare Database
Option Explicit

Declare Sub SetWindowPos Lib "User32" (ByVal hWnd&, _
ByVal hWndInsertAfter&, _
ByVal X&, ByVal Y&, ByVal cX&, _
ByVal cY&, ByVal wFlags&)

Global Const HWND_TOP = 0 'Moves MS Access window to top
'of Z-order.

'Values for wFlags.

Global Const SWP_NOZORDER = &H4 'Ignores the hWndInsertAfter.


Function SizeAccess()
Dim cX As Long, cY As Long, cHeight As Long
Dim cWidth As Long, H As Long
'Get handle to Microsoft Access.
H = Application.hWndAccessApp

cX = 15
cY = 15
cWidth = 650
cHeight = 500

'Position Microsoft Access.
SetWindowPos H, HWND_TOP, cX, cY, cWidth, cHeight, SWP_NOZORDER
Application.RefreshDatabaseWindow
End Function
 
I have been looking for an alternative to "Hiding the Access Window" and this is IT.

11 years after the fact, but this is good stuff!
 
Good stuff Colin, I just may adapt this so I can "get under the hood" without using the bypass.
 

Users who are viewing this thread

Back
Top Bottom