Ahhh... Yahh. *That* looks easier than dragging the taskbar!
Probably over my head. But... out of curiousity,
What type of file is this?
What do you name it?
Where does it get saved to?
(Or is it an edited/replacement of an existing file?)
"David Candy" <.> wrote in message
No. It will be a variation of this (which tiles 4 specific windows
(correctly))
Public Declare Function FindWindow Lib "User32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function SetWindowPos Lib "User32" (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 Long) As Long
Private Const SPI_GETWORKAREA = 48
Private Declare Function SystemParametersInfo& Lib "User32" Alias _
"SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As _
Long, lpvParam As Any, ByVal fuWinIni As Long)
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Public Const SWP_DRAWFRAME = SWP_FRAMECHANGED
Public Const SWP_FRAMECHANGED = &H20 ' The frame changed: send
WM_NCCALCSIZE
Public Const SWP_HIDEWINDOW = &H80
Public Const SWP_NOACTIVATE = &H10
Public Const SWP_NOCOPYBITS = &H100
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOOWNERZORDER = &H200 ' Don't do owner Z ordering
Public Const SWP_NOREDRAW = &H8
Public Const SWP_NOREPOSITION = SWP_NOOWNERZORDER
Public Const SWP_NOSIZE = &H1
Public Const SWP_NOZORDER = &H4
Public Const SWP_SHOWWINDOW = &H40
Sub Main()
Dim DeskMetrics As RECT
Ret = SystemParametersInfo(SPI_GETWORKAREA, 0, DeskMetrics, 0)
WinHeight = (DeskMetrics.Bottom - DeskMetrics.Top) / 2
WinWidth = (DeskMetrics.Right - DeskMetrics.Left) / 2
hwindows = FindWindow(vbNullString, "System Configuration Utility")
Ret = SetWindowPos(hwindows, 0, DeskMetrics.Left, DeskMetrics.Top,
DeskMetrics.Right, DeskMetrics.Bottom, 0)
hwindows = FindWindow(vbNullString, "ABC News - ABC Online - Microsoft
Internet Explorer")
Ret = SetWindowPos(hwindows, 0, DeskMetrics.Left + WinWidth + 1,
DeskMetrics.Top, WinWidth, WinHeight, 0)
hwindows = FindWindow(vbNullString, "Inbox - Outlook Express")
Ret = SetWindowPos(hwindows, 0, DeskMetrics.Left, DeskMetrics.Top +
WinHeight + 1, WinWidth, WinHeight, 0)
hwindows = FindWindow(vbNullString, "128km Grafton Radar Loop - Microsoft
Internet Explorer")
Ret = SetWindowPos(hwindows, 0, DeskMetrics.Left + WinWidth + 1,
DeskMetrics.Top + WinHeight + 1, WinWidth, WinHeight, 0)
End Sub