Ok, had to see for myself whether my 2nd thought was valid or not. It appears so.
To experiment. The DIB has to be adjusted, but works just fine.
1. In the click event change
From: .biHeight = m_SizeSlide.cy
To: .biHeight = m_SizeSlide.cy * 2
2. Now your timer event looks like this:
As I mentioned, it could use some optimization & this is one.Code:Private Sub Timer1_Timer() Timer1.Enabled = False Dim lStep As Long, lBF As Long, tSize As Size Const nrLinesPerScroll As Long = 5 lStep = Val(Timer1.Tag) + nrLinesPerScroll If lStep >= m_SizeSlide.cy - nrLinesPerScroll Then Unload frmSlide DeleteObject SelectObject(m_DC, m_DCbmp) DeleteDC m_DC m_DC = 0 Timer1.Tag = "" Else tSize.cy = lStep lBF = (255& - (lStep \ nrLinesPerScroll) * 5) * &H10000 Or (AC_SRC_ALPHA * &H1000000) UpdateLayeredWindow frmSlide.hwnd, 0&, ByVal 0&, m_SizeSlide, m_DC, tSize, 0&, lBF, ULW_ALPHA Timer1.Tag = lStep Timer1.Enabled = True End If End Sub




Reply With Quote