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
Printable View
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
Use .Cascase .Tile properties
Is it a Form property ? ( meaning Me.Cascade.Tile ) because I couldn't find one
Anand
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
The MDI form also had a method .Arrange and which takes 3 (4?) values for
Cascade,Tile,Arrange icons etc.