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 Sub Form_Load()
MoveWindow Me.hwnd, ScaleX(Left, vbTwips, vbPixels), ScaleY(Top, vbTwips, vbPixels), ScaleX(Width, vbTwips, vbPixels), ScaleY(Height, vbTwips, vbPixels), True
End Sub
Private Sub Form_Resize()
if Me.WindowState <> vbMinimized then
Me.Heigh = 3000 / Screen.TwipsPerPixelX
Me.Width = 400 / Screen.TwipsPerPixelY
End If
End Width