Instead of setting the windowstate to maximized, do this:
VB Code:
Option Explicit Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" ( _ ByVal uAction As Long, _ ByVal uParam As Long, _ lpvParam As Any, _ ByVal fuWinIni As Long) As Long Private Const SPI_GETWORKAREA As Long = 48 Private Type RECT lLeft As Long lTop As Long lRight As Long lBottom As Long End Type Private Sub Form_Load() Dim deskRECT As RECT Call SystemParametersInfo(SPI_GETWORKAREA, 0&, deskRECT, 0&) With deskRECT Me.Move .lLeft * Screen.TwipsPerPixelX, _ .lTop * Screen.TwipsPerPixelX, _ (.lRight - .lLeft) * Screen.TwipsPerPixelX, _ (.lBottom - .lTop) * Screen.TwipsPerPixelX End With End Sub




Reply With Quote