How to maximize Access window

  • Thread starter Thread starter Shirley
  • Start date Start date
S

Shirley

the command Docmd.Maximize only maximize the active
window. how can I maximize the Access Database Window in
VBS code?

Thanks a lot!

Shirley
 
Public Const SW_MAXIMIZE = 3
Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow
As Long) As Long
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As Any, _
ByVal lpWindowName As Any) As Long

Dim lhandle as long
lhandle = FindWindow(0&,"MyAccessAppTitle")
Call ShowWindow (lhandle,SW_MAXIMIZE)

P
 
Phobos said:
Public Const SW_MAXIMIZE = 3
Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal
nCmdShow As Long) As Long
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As Any, _
ByVal lpWindowName As Any) As Long

Dim lhandle as long
lhandle = FindWindow(0&,"MyAccessAppTitle")
Call ShowWindow (lhandle,SW_MAXIMIZE)

More recently, there's the simple

RunCommand acCmdAppMaximize
 
Back
Top