Mega Code Archive

 
Categories / Delphi / Graphic
 

How to manage desktop icons

Title: How to manage desktop icons uses CommCtrl; function GetDesktopListViewHandle: THandle; var S: String; begin Result := FindWindow('ProgMan', nil); Result := GetWindow(Result, GW_CHILD); Result := GetWindow(Result, GW_CHILD); SetLength(S, 40); GetClassName(Result, PChar(S), 39); if PChar(S) 'SysListView32' then Result := 0; end; SendMessage(GetDesktopListViewHandle, LVM_ARRANGE, LVA_ALIGNLEFT, 0);