• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 159
  • Last Modified:

Resize Window

Can anyone tell me how to resize a window like explorer or any window.

Thanks for any help
0
HillCountryFare
Asked:
HillCountryFare
1 Solution
 
StateCommented:
Public Enum SetWindowPosFlags
  SWP_NOACTIVATE = &H10
  SWP_NOCOPYBITS = &H100
  SWP_NOMOVE = &H2
  SWP_NOOWNERZORDER = &H200      '  Don't do owner Z ordering
  SWP_NOREDRAW = &H8
  SWP_NOSIZE = &H1
  SWP_NOZORDER = &H4
End Enum

Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal hwnd As Long,  _
                                    ByVal hWndInsertAfter As Long, _
                                    ByVal x As Long, ByVal y As Long, _
                                    ByVal cx As Long, ByVal cy As Long, _
                                    ByVal wFlags As SetWindowPosFlags) As Long

Public Sub MoveWindowByHandle(ByVal hwnd As Long, ByVal Left As Long, ByVal Top As Long)

Call SetWindowPos(hwnd, 0, Left, Top, 0, 0, SWP_NOSIZE + SWP_NOZORDER + SWP_NOACTIVATE)

End Sub
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now