|
在此窗體下加入以下代碼:
Option Compare Database
Option Explicit
Private Declare Function MoveWindow Lib "USER32" (ByVal hwnd As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long
Private Declare Function ShowWindow Lib "USER32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Const SW_SHOWMAXIMIZED = 3
Private Const SW_SHOWNORMAL = 1
Private Sub Form_Load()
ShowWindow Application.hWndAccessApp, SW_SHOWNORMAL
MoveWindow Application.hWndAccessApp, -1000, 0, 400, 500, 1
End Sub
Private Sub Form_Unload(Cancel As Integer)
MoveWindow Application.hWndAccessApp, 0, 0, 1100, 750, 1
End Sub |
|