Click to See Complete Forum and Search --> : How do I arrange Windows ?


M.Anand
March 26th, 1999, 04:37 AM
I open multiple windows in VB. When I minimize one of them, the other windows are arranged in a haphazard manner. How do I tile them properly ? I tried using some APIs but was not successful .


Anand

Akash
March 29th, 1999, 03:20 PM
Use .Cascase .Tile properties

M.Anand
March 30th, 1999, 01:13 AM
Is it a Form property ? ( meaning Me.Cascade.Tile ) because I couldn't find one


Anand

Chris Eastwood
March 30th, 1999, 03:12 AM
Hi


There are several ways of accomplishing this using VB. You can use the following Win32 Api's :


CascadeWindows

TileWindows

BeginDeferWindowPos

DeferWindowPos

EndDeferWindowPos


CascadeWindows:


This routine takes an array of HWNDS and cascades them on the desktop


TileWindows :


Pretty obvious what this one does


BeginDeferWindowPos

DeferWindowPos

EndDeferWindowPos


These three API calls are used together to set the position of an number of windows, the windows are not actually moved until the final 'EndDeferWindowPos' is called - this makes it an extremely fast method of moving/arranging your windows on the desktop (I use it all the time here)


If you need any more help on these API calls, just give a holler


Regards


Chris Eastwood


Codeguru - the website for developers

http://www.codeguru.com/vb

Ravi Kiran
March 30th, 1999, 05:57 AM
The MDI form also had a method .Arrange and which takes 3 (4?) values for

Cascade,Tile,Arrange icons etc.