Sub ShowTransparency(cSrc As PictureBox, cDest As PictureBox, ByVal nLevel As Byte)
On Error Resume Next
Dim LrProps As rBlendProps
Dim LnBlendPtr As Long
cDest.Cls
LrProps.tBlendAmount = nLevel
CopyMemory LnBlendPtr, LrProps, 4
With cSrc
AlphaBlend cDest.hDC, 0, 0, .ScaleWidth, .ScaleHeight, .hDC, 0, 0, .ScaleWidth, .ScaleHeight, LnBlendPtr
End With
cDest.Refresh
End Sub
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
Call CleanAll
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
If Button <> 0 Then DragKj (Me.hwnd)
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
If Button <> 0 Then DragKj (Me.hwnd)
End Sub
Private Sub Timer1_Timer()
On Error Resume Next
If NowLevel >= 0 And NowLevel <= 255 Then Call TransParent(Me.hwnd, TransColor, NowLevel)
If Fadeio = 1 Then
NowLevel = NowLevel + LVstep
If NowLevel >= 255 Then
NowLevel = 255
Timer1.Enabled = False
Call TransParent(Me.hwnd, TransColor, NowLevel)
Picture2.Move Picture2.Left, Picture3.Height
Timer2.Enabled = True
End If
Else
NowLevel = NowLevel - LVstep
If NowLevel <= 0 Then Timer1.Enabled = False: Unload Me
End If
End Sub
Private Sub Timer2_Timer()
On Error Resume Next
Picture2.Top = Picture2.Top - 40
If Picture2.Top <= 300 Then
Timer2.Enabled = False: Picture2.Top = 300
LearnMain.WindowState = 1
Call DelayCycle(1500)
PlayVoice (VoiceDisk & "再见.wav")
Fadeio = 2
Timer1.Enabled = True
End If
End Sub