根据屏幕分辨率自动调整窗体大小:[
正 文:
Option Compare Database
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Private Const SM_CXSCREEN = 0
Private Const SM_CYSCREEN = 1
Private Sub Form_Open(Cancel As Integer)
Dim x As Long, y As Long, a As Long, b As Long
x = GetSystemMetrics(SM_CXSCREEN)
y = GetSystemMetrics(SM_CYSCREEN)
a = 10000 / 800 * x
b = 7000 / 600 * y
DoCmd.MoveSize 1134, 1134, a, b
End Sub