How to maximize Access window

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
 
P

Phobos

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
 
D

Dirk Goldgar

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top