willichan Posted November 17, 2010 Posted November 17, 2010 After searching through the forums for methods to re-size a form/window, I was frustrated with complexity of many of the solutions, so here is what I came up with. This should re-size the form to have the provided client size, regardless what title bar or border settings are used, or what menu controls are used. I do not believe it does, but I extend my apologies if this duplicates something someone else has already done. Func _GUIResizeClient($hWnd, $iSizeX, $iSizeY) ;$hWnd = Handle for the form to be resized ;$iSizeX = Desired X size for the client area ;$iSizeY = Desired Y size for the client area Local $winpos = WinGetPos($hWnd) Local $wincli = WinGetClientSize($hWnd) WinMove($hWnd, "", $winpos[0], $winpos[1], $iSizeX + ($winpos[2]-$wincli[0]), $iSizeY + ($winpos[3]-$wincli[1])) EndFunc My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now