Sub DoTransition() On Error Resume Next Dim x, y, i As Byte Dim StepR(0 To 200, 0 To 200) As Single Dim StepG(0 To 200, 0 To 200) As Single Dim StepB(0 To 200, 0 To 200) As Single Dim R(0 To 200, 0 To 200) As Single Dim G(0 To 200, 0 To 200) As Single Dim B(0 To 200, 0 To 200) As Single Dim TempLong As Long Dim StartCol As RGBcolor Dim EndCol As RGBcolor Dim DiffColR As Integer Dim DiffColG As Integer Dim DiffColB As Integer Me.MousePointer = vbHourglass Steps = 2 '(11 - SpeedScroll.Value) * 10 For x = 0 To 200 For y = 0 To 200 TempLong = GetPixel(T1.hdc, x, y) StartCol.R = TempLong And 255 StartCol.G = (TempLong And 65280) \ 256& StartCol.B = (TempLong And 16711680) \ 65535 TempLong = GetPixel(T2.hdc, x, y) EndCol.R = TempLong And 255 EndCol.G = (TempLong And 65280) \ 256& EndCol.B = (TempLong And 16711680) \ 65535 R(x, y) = StartCol.R G(x, y) = StartCol.G B(x, y) = StartCol.B If EndCol.R > StartCol.R Then DiffColR = EndCol.R - StartCol.R Else DiffColR = StartCol.R - EndCol.R DiffColR = -DiffColR End If If EndCol.G > StartCol.G Then DiffColG = EndCol.G - StartCol.G Else DiffColG = StartCol.G - EndCol.G DiffColG = -DiffColG End If If EndCol.B > StartCol.B Then DiffColB = EndCol.B - StartCol.B Else DiffColB = StartCol.B - EndCol.B DiffColB = -DiffColB End If StepR(x, y) = DiffColR / Steps StepG(x, y) = DiffColG / Steps StepB(x, y) = DiffColB / Steps Next Next Me.MousePointer = vbDefault For x = 0 To 200 For y = 0 To 200 R(x, y) = R(x, y) + StepR(x, y) G(x, y) = G(x, y) + StepG(x, y) B(x, y) = B(x, y) + StepB(x, y) SetPixel PB.hdc, x, y, RGB(R(x, y), G(x, y), B(x, y)) Next Next BitBlt Display.hdc, 0, 0, 200, 200, PB.hdc, 0, 0, vbSrcCopy End Sub