'Globals '**************************************************************** 'Windows API/Global Declarations for :ArrangeIconsOnDesktop '**************************************************************** Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Const GW_CHILD = 5 Private Const LVA_ALIGNLEFT = &H1 Private Const LVM_ARRANGE = &H1016 'Code 'When you want to arrange the icons, use this code: Dim hWnd1 As Long Dim hWnd2 As Long Dim Ret As Long hWnd1 = FindWindow("Progman", vbNullString) hWnd2 = GetWindow(hWnd1, GW_CHILD) hWnd1 = GetWindow(hWnd2, GW_CHILD) Ret = SendMessage(hWnd1, LVM_ARRANGE, LVA_ALIGNLEFT, 0)