Quote Originally Posted by jmsrickland View Post
Your code would be a lot easier to read if you use Select Case insteat of a bunch of If statements

Code:
   For i = 1 To aimg.Count - 2
     Select Case fraFrame(i).GCGraphicControl.Disposal
       Case 0    ' No Action
         '
       Case 1    ' Leave
         Stop
         'ActualFrame = PreviousFrame + TransparentActualFrame                '
                
         BitBlt aimg(aimg.Count - 1).hdc, 0, 0, aimg(i - 1).ScaleWidth, aimg(i - 1).ScaleHeight, aimg(i - 1).hdc, 0, 0, vbSrcCopy
       
         If fraFrame(i).GCGraphicControl.BackColor <> LSDLogicalScreenDescription.BackColor Then
           TransparentBlt aimg(aimg.Count - 1).hdc, fraFrame(i).IDImageDescription.FrameLeft, fraFrame(i).IDImageDescription.FrameTop, aimg(i).ScaleWidth, aimg(i).ScaleHeight, aimg(i).hdc, 0, 0, aimg(i).ScaleWidth, aimg(i).ScaleHeight, GetPixel(aimg(i).hdc, 0, 0)
         Else
           BitBlt aimg(aimg.Count - 1).hdc, fraFrame(i).IDImageDescription.FrameLeft, fraFrame(i).IDImageDescription.FrameTop, aimg(i).ScaleWidth, aimg(i).ScaleHeight, aimg(i).hdc, 0, 0, vbSrcCopy
         End If
       
         aimg(i).Picture = aimg(aimg.Count - 1).Image
         aimg(aimg.Count - 1).Cls
       
       Case 2    ' Restore Background
         '
       Case 3    ' Restore Previous
         '
       Case Else ' Error
         '
     End Select
   Next i
I disagree with your method for transparency. You may think it works but I believe later you will find that it won't be what you expected.
thanks for the Case...End Select opinion. why you use the "stop" keyword"?
my objective is detect if the backcolor is or not is transparent. and that hallowen.gif image works 100% on positions and frame correctly
the down.gif image stills show me a problem, because show me the last frame... so the if isn't 100%
thanks for all
(MODERATOR: isn't the 1st time that the text cursor have a strange behavior.... but isn't my fault if your forum detect a spam by this bug)