Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Function fSetAccessWindow(nCmdShow As Long)
' 使用举例
' 最大化 Access 窗口
' ?fSetAccessWindow(SW_SHOWMAXIMIZED)
' 最小化 Access 窗口
' ?fSetAccessWindow(SW_SHOWMINIMIZED)
' 隐藏 Access 窗口
' ?fSetAccessWindow(SW_HIDE)
' 正常显示 Access 窗口
' ?fSetAccessWindow(SW_SHOWNORMAL)
'
Dim loX As Long
Dim loForm As Form
On Error Resume Next
loX = ShowWindow(hWndAccessApp, nCmdShow)
Err.Clear
fSetAccessWindow = (loX <> 0)
End Function
上一篇 Access数据库技术(47)