Using MoveWindow API in Visual Basic

Discussion in 'Visual Basic ( VB )' started by shabbir, Aug 20, 2005.

  1. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Visual Basic Move Window API definition

    Code:
    Public Declare Function MoveWindow Lib "user32" Alias "MoveWindow" 
    (ByVal hwnd As Long,     ' Handle to the Window e.g. Me.Hwnd
    ByVal x As Long,         ' New position of the left side of the Window/Form.
    ByVal y As Long,         ' New position of the top side of the Window/Form.
    ByVal nWidth As Long,    ' New width of the Window
    ByVal nHeight As Long,   ' New height of the Window
    ByVal bRepaint As Long)  ' Specifies whether Window is to be repainted. True means repainted
    As Long                  ' If the function succeeds, the return value is nonzero else zero.
    
    Also you should be careful about the OS version and according to the MSDN it states Minimum operating systems Windows 95, Windows NT 3.1
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice