标题: 在Access中如何根据屏幕分辨率自动调整窗体大小? [打印本页] 作者: 徐依淼 时间: 2013-7-4 10:42 标题: 在Access中如何根据屏幕分辨率自动调整窗体大小? 作者: 淡写轻描 时间: 2013-7-4 10:49
可以试试下面的代码Option Compare DatabasePrivate Declare Function GetSystemMetricsLib "user32" (ByVal nIndex As Long) As LongPrivate Const SM_CXSCREEN = 0Private Const SM_CYSCREEN = 1 Private Sub Form_Open(Cancel As Integer)Dim x As Long, y As Long, a As Long, b AsLongx = GetSystemMetrics(SM_CXSCREEN)y = GetSystemMetrics(SM_CYSCREEN)a = 10000 / 800 * xb = 7000 / 600 * yDoCmd.MoveSize 1134, 1134, a, bEnd Sub