ViewIconanimate




'Leggi la prima icona dal file con

hIcon = ExtractIcon(App.hInstance, AniIconFile, 0)
'poi disegni l'icona che ti interessa sulla picturebox cosi':

hDC=Picture1.hDC

AniState = DrawIconEx(hDC, XPos, YPos, hIcon, 0, 0, iStep, 0, 3)

If AniState > 0 Then
iStep = iStep + 1
Else
ANiState = DrawIconEx(hDC, (ScaleWidth - 32) \ 2, (ScaleHeight - 32) \ 2, hIcon, 0, 0, 0, 0, 3)
iStep = 1
End If

'dove iStep e' il frame che ti interessa.

'Quest'ultima parte la puoi mettere in un timer.

'Per l'ultimo parametro di DrawIconEx vedi le const

'DI_COMPAT Draws the icon or cursor using the system default image rather

'than the user-specified image.

'DI_DEFAULTSIZE Draws the icon or cursor using the width and

'height specified by the system metric values for cursors or

'icons, if the cxWidth and cyWidth parameters are set to zero

'If this flag is not specified and cxWidth and cyWidth are

'set to zero, the function uses the actual 'resource size.

'DI_IMAGE Draws the icon or cursor using the image.

'DI_MASK Draws the icon or cursor using the mask.

'DI_NORMAL Combination of DI_IMAGE and DI_MASK.











( viewiconanimate.html )- by Paolo Puglisi - Modifica del 17/12/2023