So THAT'S the step I kept missing. I knew the API could cascade the windows
but it never occurred to me to use anything other than main application
window. Every time I tried to arrange the windows, nothing happened. Thanks
Randall.
--
Get free software and more at
http://msnhomepages.talkcity.com/protectionfault/foquendo
"Randall Rath" wrote in message
news:87lpk2$edi3@adesknews2.autodesk.com...
> From the Visual Basic Help Files of VB Design
> http://vbdesign.hypermart.net/cadpages/
>
> Hi James,
> Are you up to using the Win32API? This is set to tile Horizontal, but the
> constants are there to cascade, or tile vertical...
>
> Place this code in a standard module:
>
> 'Begin code block
> Option Explicit
> 'From VB Design!
> Public Declare Function SendMessage Lib "user32" Alias "SendMessageA"
(ByVal
> hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As
> Long
> Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
> lpClassName As String, ByVal lpWindowName As String) As Long
> Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As
> Long) As Long
> Public Const WM_MDICASCADE = &H227
> Public Const WM_MDITILE = &H226
> Public Const MDITILE_HORIZONTAL = &H1
> Public Const MDITILE_SKIPDISABLED = &H2
> 'You can combine skip disabled with any of the others!
> Public Const MDITILE_VERTICAL = &H0
> Public Const GW_CHILD = 5
>
>
> Public Sub TileDwgs()
> Dim lngHwnd As Long
> Dim lngMDIHwnd As Long
> lngHwnd = FindWindow(vbNullString, Application.Caption)
> lngMDIHwnd = GetWindow(lngHwnd, GW_CHILD)
> SendMessage lngMDIHwnd, WM_MDITILE, MDITILE_HORIZONTAL, 0
> End Sub
> 'End Code Block
>
> Randall Rath
> VB Design
>
>