RE:Ajustar formulario a la resolucion de pantalla
Espero te sirva esto
ESTO LO PONES EN UN MODULO GLOBAL
Declare Function GetDesktopWindow Lib "user32" () As Long
Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, rectangle As _
RECT) As Long
Public posicion as string
Type RECT
x1 As Long
y1 As Long
x2 As Long
y2 As Long
End Type
Function GetScreenResolution() As String
Dim R As RECT, hwnd As Long, RetVal As Long
hwnd = GetDesktopWindow()
RetVal = GetWindowRect(hwnd, R)
GetScreenResolution = (R.x2 - R.x1) & "x" & (R.y2 - R.y1)
End Function
----------------------------------------------------------------------------------------------------------
ESTO EN EL EVENTO AL ABRIR DEL/O LOS FORMULARIOS
Private Sub Form_Open(Cancel As Integer)
‘100=MARGEN IZQUIERDO
‘50 = MARGEN SUPERIOR
‘800= ANCHO
‘510 = ALTO
ESTAS MEDIDAS SE AJUSTAN A LO QUE QUIERA EL USUARIO
If GetScreenResolution = "1024x768" Then
posicion = glrMoveWindows(Me.hwnd, 100, 50, 800, 510, True)
Else
posicion = glrMoveWindows(Me.hwnd, 100, -20, 800, 510, True)
End If
End Sub