aber dabei stürzt das bei mir immer ab -.-... ich mach wohl iwas falsch [img]/sad.gif[/img]
kann da jemand helfen? :confused:
habs jetzt raus, wie man die icons ausließt:
Visual Basic: [code]Public Const SMALL_ICON As Integer = 16 Public Const DI_NORMAL = 3 Public Declare Function DrawIconEx Lib "user32" _ (ByVal hdc As Long, ByVal xLeft As Long, ByVal yTop As Long, _ ByVal hIcon As Long, ByVal cxWidth As Long, ByVal cyWidth As Long, _ ByVal istepIfAniCur As Long, ByVal hbrFlickerFreeDraw As Long, _ ByVal diFlags As Long) As Long
Public Declare Function ExtractIconEx Lib "shell32.dll" _ Alias "ExtractIconExA" (ByVal lpszFile As String, ByVal nIconIndex As Long, _ phiconLarge As Long, phiconSmall As Long, ByVal nIcons As Long) As Long
Public Function Iconladen(Datei As String) Dim glSmallIcons() As Long Dim lIndex As Long Dim lIcons As Long
Call ExtractIconEx(Datei, lIndex, 0, glSmallIcons(lIndex), 1) ' Draw the icon to respective picturebox control. With Form1.Picture1 Set .Picture = LoadPicture("") .AutoRedraw = True Call DrawIconEx(.hdc, 0, 0, glSmallIcons(lIndex), SMALL_ICON, SMALL_ICON, 0, 0, DI_NORMAL) .Refresh End With
End Function[/code]
hier wird halt das kleine icon in form1.picture1 angezeigt...
aber: -.- ich möchte dass diese icons in einer listview kommen... ich versuch das mit der imagelist... nur immer wenn ich: Visual Basic: [code]Imagelist1.ListImages.Add , , Picture1.Picture[/code] aufrufe, kommt der fehler: "ungültiges bild"
AAAARGH:mad: weiß da zufällig jemand rat? _________________