Rubrik: System/Windows · Desktop/Bildschirm/Display | VB-Versionen: VB4, VB5, VB6 | 30.11.00 |
Desktop-Icons linksbündig anordnen Mit diesem Tip lassen sich die Icons auf dem Desktop linksbündig anordnen... | ||
Autor: Andreas Wolff | Bewertung: | Views: 15.449 |
www.andreaswolff.de | System: Win9x, WinNT, Win2k, WinXP, Win7, Win8, Win10, Win11 | Beispielprojekt auf CD |
Mit diesem Tip lassen sich die Icons auf dem Desktop linksbündig anordnen...
' Allgemeine Deklaration 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 ' Aufruf 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, 12)