Aligner les icones du bureau!!!

cs_MEGATRIX Messages postés 124 Date d'inscription jeudi 3 janvier 2002 Statut Membre Dernière intervention 31 décembre 2011 - 11 juin 2002 à 22:46
cs_thitoune Messages postés 124 Date d'inscription mardi 19 février 2002 Statut Membre Dernière intervention 7 mars 2004 - 19 juin 2002 à 12:02
Comment aligné les icones de mon bureau?
merci
@++
Megatrix

1 réponse

cs_thitoune Messages postés 124 Date d'inscription mardi 19 février 2002 Statut Membre Dernière intervention 7 mars 2004 2
19 juin 2002 à 12:02
Ce code n'est pas de moi mais ca marche :

Public Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, _
ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Const GW_CHILD = 5
Public Const LVA_ALIGNLEFT = &H1
Public Const LVM_ARRANGE = &H1016

Public Sub ArrangeIcons()
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)
End Sub
0
Rejoignez-nous