Global Const SW_HIDE = 0
Global Const SW_SHOWNORMAL = 1
Global Const SW_SHOWMINIMIZED = 2
Global Const SW_SHOWMAXIMIZED = 3
Private Declare Function apiShowWindow Lib "user32" _
Alias "ShowWindow" (ByVal hwnd As Long, _
ByVal nCmdShow As Long) As Long
Function fSetAccessWindow(nCmdShow As Long)
Dim loX As Long
Dim loForm As Form
On Error Resume Next
loX = apiShowWindow(hWndAccessApp, nCmdShow)
Err.Clear
fSetAccessWindow = (loX <> 0)
End Function
启动窗体:
Private Sub Form_Load()
fSetAccessWindow (SW_HIDE)
DoCmd.Restore
End Sub
程序运行过程中调用fSetAccessWindow (SW_SHOWMAXIMIZED)后,系统的主窗口出现并最大化,但菜单哪去了?怎么找回来?第二,在上个问题解决后,如何才能在fSetAccessWindow(SW_SHOWMAXIMIZED)之后,只显示<文件>菜单?