home *** CD-ROM | disk | FTP | other *** search
- ' These are the graphics special effects routines
- Dim SourceWidth As Integer, SourceHeight As Integer
- Dim DestWidth As Integer, DestHeight As Integer
- Dim DestX As Integer, DestY As Integer
- Dim TempWidth As Integer, TempHeight As Integer
- Dim WidthFactor As Single, HeightFactor As Single
- Dim X As Integer, LoopCounter As Integer
- Dim SaveRedraw As Integer ' For special effects
-
- ' All picture scalemodes must be 1 (Twips) or 3 (Pixels)
-
- ' Source and Work pictures must have AutoRedraw = MhTrue
-
- ' When diagonal (or other angled) lines are present in
- ' the bitmaps, best results are obtained when the
- ' destination picturebox size is exactly proportional
- ' to the source picturebox.
-
- ' Best results are obtained when the BorderStyle of all
- ' pictureboxes are identical.
-
- Sub MhVRotate (Source As Control, Dest As Control, Work As Control, Work2 As Control)
-
- Const Cycles = 6 ' Number of cycles per effect
- FixupSizes Dest, Work, Work2
- ' Copy the destination picture to the work picture
- MhStretchBlt Dest, Work
- X = DoEvents() ' Make sure the sizes "take"
-
- ' Get our working values
- CalculateValues Source, Dest, Cycles
-
- ' Now squeeeeze the destination picture so it appears
- ' to be rotating around.
-
- ' Calculate value to reduce, and then increase width by each cycle
- TempWidth = DestWidth + 1 ' So we end up with 2 pixel wide axis
- For LoopCounter = 1 To Cycles
- ' Calculate new width
- TempWidth = TempWidth - WidthFactor
- ' Calculate new X point
- DestX = (DestWidth - TempWidth) \ 2
- Work2.Cls ' Clear the second work box
- ' Stretch the work box into the second work box
- X = StretchBlt(Work2.hDC, DestX, 0, TempWidth, DestHeight, Work.hDC, 0, 0, DestWidth, DestHeight, SRCCOPY)
- ' Copy second work box to destination box
- X = BitBlt(Dest.hDC, 0, 0, DestWidth, DestHeight, Work2.hDC, 0, 0, SRCCOPY)
- Next
-
- ' Copy the source picture to the first work picture
- MhStretchBlt Source, Work
-
- ' Get our working values
- CalculateValues Source, Dest, Cycles
-
- ' Now expand into the destination box, giving the effect of rotation
-
- For LoopCounter = 1 To Cycles
- Work2.Cls ' Clear the second work box
- ' Stretch the work box into the second work box
- X = StretchBlt(Work2.hDC, DestX, 0, TempWidth, DestHeight, Work.hDC, 0, 0, DestWidth, DestHeight, SRCCOPY)
- ' Copy second work box to destination box
- X = BitBlt(Dest.hDC, 0, 0, DestWidth, DestHeight, Work2.hDC, 0, 0, SRCCOPY)
- ' Calculate new width
- TempWidth = TempWidth + WidthFactor
- ' Calculate new X point
- DestX = (DestWidth - TempWidth) \ 2
- Next
- ' Finally, copy Source to Dest in case last copy above was not full copy
- FinalStretch Work, Dest
-
- End Sub
-
- Sub MhHRotate (Source As Control, Dest As Control, Work As Control, Work2 As Control)
-
- Const Cycles = 6 ' Number of cycles per effect
- FixupSizes Dest, Work, Work2
- ' Copy the destination picture to the work picture
- MhStretchBlt Dest, Work
- X = DoEvents() ' Make sure the sizes "take"
-
- ' Get our working values
- CalculateValues Source, Dest, Cycles
-
- ' Now squeeeeze the destination picture so it appears
- ' to be rotating around.
-
- ' Calculate value to reduce, and then increase height by each cycle
- TempHeight = DestHeight + 1 ' So we end up with 2 pixel high axis
- For LoopCounter = 1 To Cycles
- ' Calculate new Height
- TempHeight = TempHeight - HeightFactor
- ' Calculate new X point
- DestY = (DestHeight - TempHeight) \ 2
- Work2.Cls ' Clear the second work box
- ' Stretch the work box into the second work box
- X = StretchBlt(Work2.hDC, 0, DestY, DestWidth, TempHeight, Work.hDC, 0, 0, DestWidth, DestHeight, SRCCOPY)
- ' Copy second work box to destination box
- X = BitBlt(Dest.hDC, 0, 0, DestWidth, DestHeight, Work2.hDC, 0, 0, SRCCOPY)
- Next
-
- ' Copy the source picture to the first work picture
- MhStretchBlt Source, Work
-
- ' Get our working values
- CalculateValues Source, Dest, Cycles
-
- ' Now expand into the destination box, giving the effect of rotation
-
- For LoopCounter = 1 To Cycles
- Work2.Cls ' Clear the second work box
- ' Stretch the work box into the second work box
- X = StretchBlt(Work2.hDC, 0, DestY, DestWidth, TempHeight, Work.hDC, 0, 0, DestWidth, DestHeight, SRCCOPY)
- ' Copy second work box to destination box
- X = BitBlt(Dest.hDC, 0, 0, DestWidth, DestHeight, Work2.hDC, 0, 0, SRCCOPY)
- ' Calculate new width
- TempHeight = TempHeight + HeightFactor
- ' Calculate new Y point
- DestY = (DestHeight - TempHeight) \ 2
- Next
- ' Finally, copy Source to Dest in case last copy above was not full copy
- FinalStretch Work, Dest
-
- End Sub
-
- Sub MhExplode (Source As Control, Dest As Control, Work As Control, Work2 As Control)
-
- Const Cycles = 8 ' Number of cycles per effect
- ' This routine explodes Source picturebox into Dest picturebox
-
- FixupSizes Dest, Work, Work2
- ' Copy the source picture to the work picture
- MhStretchBlt Source, Work
-
- ' Get our working values
- CalculateValues Source, Dest, Cycles
-
- For LoopCounter = 1 To Cycles
- ' Calculate new X point
- DestX = (DestWidth - TempWidth) \ 2
- ' Calculate new Y point
- DestY = (DestHeight - TempHeight) \ 2
- ' Stretch the work box into the second work box
- X = StretchBlt(Work2.hDC, DestX, DestY, TempWidth, TempHeight, Work.hDC, 0, 0, DestWidth, DestHeight, SRCCOPY)
- ' Copy second work box to destination box
- X = BitBlt(Dest.hDC, DestX, DestY, TempWidth, TempHeight, Work2.hDC, DestX, DestY, SRCCOPY)
- ' Calculate new width/height
- TempWidth = TempWidth + WidthFactor
- TempHeight = TempHeight + HeightFactor
- Next
-
- ' Finally, copy Source to Dest in case last copy above was not full copy
- FinalStretch Work, Dest
-
- End Sub
-
- Sub MhImplode (Dest As Control, Work As Control, Work2 As Control)
-
- Const Cycles = 12 ' Number of cycles per effect
- ' This effect implodes Dest picturebox into itself
-
- ' For this routine, we double the cycles value because we do only
- ' a single effect.
-
- FixupSizes Dest, Work, Work2
- ' Copy the source picture to the work picture
- MhStretchBlt Dest, Work
-
- ' Get our working values
- CalculateValues Dest, Dest, Cycles
-
- ' Calculate value to decrease width/height by each cycle
- TempWidth = DestWidth
- TempHeight = DestHeight
- For LoopCounter = 1 To Cycles
- ' Calculate new width/height
- TempWidth = TempWidth - WidthFactor
- TempHeight = TempHeight - HeightFactor
- ' Calculate new X point
- DestX = (DestWidth - TempWidth) \ 2
- ' Calculate new Y point
- DestY = (DestHeight - TempHeight) \ 2
- Work2.Cls ' Clear second work box
- ' Stretch the work box into the second work box
- X = StretchBlt(Work2.hDC, DestX, DestY, TempWidth, TempHeight, Work.hDC, 0, 0, DestWidth, DestHeight, SRCCOPY)
- ' Copy second work box to destination box
- X = BitBlt(Dest.hDC, 0, 0, DestWidth, DestHeight, Work2.hDC, 0, 0, SRCCOPY)
- Next
- Dest.AutoRedraw = MhTrue
- Dest.Cls ' Clear it in case last one wasn't zeros
- Dest.AutoRedraw = SaveRedraw ' Restore state you passed
-
- End Sub
-
- Sub CalculateValues (Source As Control, Dest As Control, Cycles As Integer)
-
- Dim Divisor As Integer, Edge As Integer
- If Source.BorderStyle Then
- Edge = 1
- Else
- Edge = 0
- End If
- If Source.ScaleMode = 1 Then
- Divisor = 15
- Else
- Divisor = 1
- End If
- SourceWidth = Source.ScaleWidth \ Divisor - Edge * 2
- SourceHeight = Source.ScaleHeight \ Divisor - Edge * 2
- If Dest.BorderStyle Then
- Edge = 1
- Else
- Edge = 0
- End If
- If Dest.ScaleMode = 1 Then
- Divisor = 15
- Else
- Divisor = 1
- End If
- DestWidth = Dest.ScaleWidth \ Divisor - Edge * 2
- DestHeight = Dest.ScaleHeight \ Divisor - Edge * 2
- WidthFactor = DestWidth / Cycles
- HeightFactor = DestHeight / Cycles
- ' These next two are used by several routines
- TempWidth = WidthFactor
- TempHeight = HeightFactor
-
- End Sub
-
- Sub MhStretchBlt (Source As Control, Dest As Control)
-
- ' This sub simply does a StretchBlt from the Source Picturebox
- ' to the Destination Picturebox
-
- CalculateValues Source, Dest, 1
- X = StretchBlt(Dest.hDC, 0, 0, DestWidth, DestHeight, Source.hDC, 0, 0, SourceWidth, SourceHeight, SRCCOPY)
-
- End Sub
-
- Sub FixupSizes (Dest As Control, Work As Control, Work2 As Control)
-
- ' Make sure that both work boxes are same dimensions
- ' as destination box
- Work.Width = Dest.Width
- Work.Height = Dest.Height
- Work2.Width = Dest.Width
- Work2.Height = Dest.Height
- X = DoEvents() ' Make sure the sizes "take"
- SaveRedraw = Dest.AutoRedraw ' Save for restoring later
- Dest.AutoRedraw = MhFalse
-
- End Sub
-
- Sub MhPushRight (Source As Control, Dest As Control, Work As Control, Work2 As Control)
-
- Const Cycles = 24 ' Number of cycles per effect
- FixupSizes Dest, Work, Work2
- ' Copy the destination picture to the work picture
- MhStretchBlt Dest, Work
- ' Copy the source picture to the work2 picture
- MhStretchBlt Source, Work2
- X = DoEvents() ' Make sure the sizes "take"
-
- ' Get our working values
- CalculateValues Source, Dest, Cycles
- For LoopCounter = 1 To Cycles
- ' Copy rightmost portion of Work2 (source) to left part of Dest
- X = BitBlt(Dest.hDC, 0, 0, TempWidth, DestHeight, Work2.hDC, DestWidth - TempWidth, 0, SRCCOPY)
- ' Copy leftmost portion of Work (original Dest) to right part of Dest
- X = BitBlt(Dest.hDC, TempWidth, 0, DestWidth - TempWidth, DestHeight, Work.hDC, 0, 0, SRCCOPY)
- TempWidth = TempWidth + WidthFactor!
- If TempWidth > DestWidth Then
- Exit For
- End If
- MhFxDelay 2000
- Next
-
- ' Finally, copy Source to Dest in case last copy above was not full copy
- FinalStretch Work2, Dest
-
- End Sub
-
- Sub MhPushLeft (Source As Control, Dest As Control, Work As Control, Work2 As Control)
-
- Const Cycles = 24 ' Number of cycles per effect
- FixupSizes Dest, Work, Work2
- ' Copy the destination picture to the work picture
- MhStretchBlt Dest, Work
- ' Copy the source picture to the work2 picture
- MhStretchBlt Source, Work2
- X = DoEvents() ' Make sure the sizes "take"
-
- ' Get our working values
- CalculateValues Source, Dest, Cycles
- For LoopCounter = 1 To Cycles
- ' Copy rightmost portion of Work (original destination) to left part of Dest
- X = BitBlt(Dest.hDC, 0, 0, DestWidth - TempWidth, DestHeight, Work.hDC, TempWidth, 0, SRCCOPY)
- ' Copy leftmost portion of Work2 (source) to right part of Dest
- X = BitBlt(Dest.hDC, DestWidth - TempWidth, 0, TempWidth, DestHeight, Work2.hDC, 0, 0, SRCCOPY)
- TempWidth = TempWidth + WidthFactor
- If TempWidth > DestWidth Then
- Exit For
- End If
- MhFxDelay 2000
- Next
-
- ' Finally, copy Source to Dest in case last copy above was not full copy
- FinalStretch Work2, Dest
-
- End Sub
-
- Sub MhPushUp (Source As Control, Dest As Control, Work As Control, Work2 As Control)
-
- Const Cycles = 24 ' Number of cycles per effect
- FixupSizes Dest, Work, Work2
- ' Copy the destination picture to the work picture
- MhStretchBlt Dest, Work
- ' Copy the source picture to the work2 picture
- MhStretchBlt Source, Work2
- X = DoEvents() ' Make sure the sizes "take"
-
- ' Get our working values
- CalculateValues Source, Dest, Cycles
- For LoopCounter = 1 To Cycles
- ' Copy bottommost portion of Work (original destination) to top part of Dest
- X = BitBlt(Dest.hDC, 0, 0, DestWidth, DestHeight - TempHeight, Work.hDC, 0, TempHeight, SRCCOPY)
- ' Copy topmost portion of Work2 (source) to bottom part of Dest
- X = BitBlt(Dest.hDC, 0, DestHeight - TempHeight, DestWidth, TempHeight, Work2.hDC, 0, 0, SRCCOPY)
- TempHeight = TempHeight + HeightFactor
- If TempHeight > DestHeight Then
- Exit For
- End If
- MhFxDelay 2000
- Next
-
- ' Finally, copy Source to Dest in case last copy above was not full copy
- FinalStretch Work2, Dest
- End Sub
-
- Sub MhPushDown (Source As Control, Dest As Control, Work As Control, Work2 As Control)
-
- Const Cycles = 24 ' Number of cycles per effect
- FixupSizes Dest, Work, Work2
- ' Copy the destination picture to the work picture
- MhStretchBlt Dest, Work
- ' Copy the source picture to the work2 picture
- MhStretchBlt Source, Work2
- X = DoEvents() ' Make sure the sizes "take"
-
- ' Get our working values
- CalculateValues Source, Dest, Cycles
- For LoopCounter = 1 To Cycles
- ' Copy topmost portion of Work (original destination) to bottom part of Dest
- X = BitBlt(Dest.hDC, 0, TempHeight, DestWidth, DestHeight - TempHeight, Work.hDC, 0, 0, SRCCOPY)
- ' Copy bottommost portion of Work2 (source) to top part of Dest
- X = BitBlt(Dest.hDC, 0, 0, DestWidth, TempHeight, Work2.hDC, 0, DestHeight - TempHeight, SRCCOPY)
- TempHeight = TempHeight + HeightFactor
- If TempHeight > DestHeight Then
- Exit For
- End If
- MhFxDelay 2000
- Next
-
- ' Finally, copy Source to Dest in case last copy above was not full copy
- FinalStretch Work2, Dest
-
- End Sub
-
- Sub MhOverlayUp (Source As Control, Dest As Control, Work As Control)
-
- Const Cycles = 24 ' Number of cycles per effect
- FixupSizes Dest, Work, Work
- ' Copy the source picture to the work picture
- MhStretchBlt Source, Work
- X = DoEvents() ' Make sure the sizes "take"
-
- ' Get our working values
- CalculateValues Source, Dest, Cycles
- For LoopCounter = 1 To Cycles
- ' Copy topmost portion of Work (source) to bottom part of Dest
- X = BitBlt(Dest.hDC, 0, DestHeight - TempHeight, DestWidth, TempHeight, Work.hDC, 0, 0, SRCCOPY)
- TempHeight = TempHeight + HeightFactor
- If TempHeight > DestHeight Then
- Exit For
- End If
- MhFxDelay 2000
- Next
- ' Finally, copy Source to Dest in case last copy above was not full copy
- FinalStretch Work, Dest
-
- End Sub
-
- Sub MhOverlayDown (Source As Control, Dest As Control, Work As Control)
-
- Const Cycles = 24 ' Number of cycles per effect
- FixupSizes Dest, Work, Work
- ' Copy the source picture to the work picture
- MhStretchBlt Source, Work
- X = DoEvents() ' Make sure the sizes "take"
-
- ' Get our working values
- CalculateValues Source, Dest, Cycles
- For LoopCounter = 1 To Cycles
- ' Copy bottommost portion of Work (source) to top part of Dest
- X = BitBlt(Dest.hDC, 0, 0, DestWidth, TempHeight, Work.hDC, 0, DestHeight - TempHeight, SRCCOPY)
- TempHeight = TempHeight + HeightFactor
- If TempHeight > DestHeight Then
- Exit For
- End If
- MhFxDelay 2000
- Next
- ' Finally, copy Source to Dest in case last copy above was not full copy
- FinalStretch Work, Dest
-
- End Sub
-
- Sub MhOverlayRight (Source As Control, Dest As Control, Work As Control)
-
- Const Cycles = 24 ' Number of cycles per effect
- FixupSizes Dest, Work, Work
- ' Copy the source picture to the work picture
- MhStretchBlt Source, Work
- X = DoEvents() ' Make sure the sizes "take"
-
- ' Get our working values
- CalculateValues Source, Dest, Cycles
- For LoopCounter = 1 To Cycles
- ' Copy leftmost portion of Work (source) to right part of Dest
- X = BitBlt(Dest.hDC, DestWidth - TempWidth, 0, TempWidth, DestHeight, Work.hDC, 0, 0, SRCCOPY)
- TempWidth = TempWidth + WidthFactor
- If TempWidth > DestWidth Then
- Exit For
- End If
- MhFxDelay 2000
- Next
- ' Finally, copy Source to Dest in case last copy above was not full copy
- FinalStretch Work, Dest
-
- End Sub
-
- Sub MhOverlayLeft (Source As Control, Dest As Control, Work As Control)
-
- Const Cycles = 24 ' Number of cycles per effect
- FixupSizes Dest, Work, Work
- ' Copy the source picture to the work picture
- MhStretchBlt Source, Work
- X = DoEvents() ' Make sure the sizes "take"
-
- ' Get our working values
- CalculateValues Source, Dest, Cycles
- For LoopCounter = 1 To Cycles
- ' Copy rightmost portion of Work (source) to left part of Dest
- X = BitBlt(Dest.hDC, 0, 0, TempWidth, DestHeight, Work.hDC, DestWidth - TempWidth, 0, SRCCOPY)
- TempWidth = TempWidth + WidthFactor
- If TempWidth > DestWidth Then
- Exit For
- End If
- MhFxDelay 2000
- Next
- ' Finally, copy Source to Dest in case last copy above was not full copy
- FinalStretch Work, Dest
-
- End Sub
-
- Sub MhVCurtainClose (Source As Control, Dest As Control, Work As Control, Work2 As Control)
-
- Const Cycles = 24 ' Number of cycles per effect
- FixupSizes Dest, Work, Work2
- ' Copy the dest picture to the work2 picture
- MhStretchBlt Source, Work2
- X = DoEvents() ' Make sure the sizes "take"
-
- ' Get our working values
- CalculateValues Source, Dest, Cycles
- For LoopCounter = 1 To Cycles
- ' Copy Dest picture to Work picture
- X = BitBlt(Work.hDC, 0, 0, DestWidth, DestHeight, Dest.hDC, 0, 0, SRCCOPY)
-
- ' Copy rightmost part of left half of source
- ' picture to left side of work picture
- X = BitBlt(Work.hDC, 0, 0, TempWidth, DestHeight, Work2.hDC, (DestWidth \ 2) - TempWidth, 0, SRCCOPY)
-
- ' Copy leftmost part of right half of source
- ' picture to right side of work picture
- X = BitBlt(Work.hDC, DestWidth - TempWidth, 0, TempWidth, DestHeight, Work2.hDC, (DestWidth \ 2), 0, SRCCOPY)
-
- ' Finally, copy entire Work to Dest
- X = BitBlt(Dest.hDC, 0, 0, DestWidth, DestHeight, Work.hDC, 0, 0, SRCCOPY)
-
- TempWidth = TempWidth + WidthFactor!
- If TempWidth * 2 > DestWidth Then
- Exit For
- End If
- Next
-
- ' Finally, copy Source to Dest in case last copy above was not full copy
- FinalStretch Source, Dest
-
- End Sub
-
- Sub MhVCurtainOpen (Source As Control, Dest As Control, Work As Control, Work2 As Control)
-
- Const Cycles = 24 ' Number of cycles per effect
- FixupSizes Dest, Work, Work2
- ' Copy the dest picture to the work2 picture
- MhStretchBlt Dest, Work2
- X = DoEvents() ' Make sure the sizes "take"
-
- ' Get our working values
- CalculateValues Source, Dest, Cycles
- TempWidth = DestWidth \ 2 - WidthFactor
- For LoopCounter = 1 To Cycles
- ' Copy Source picture to Work picture
- X = StretchBlt(Work.hDC, 0, 0, DestWidth, DestHeight, Source.hDC, 0, 0, SourceWidth, SourceHeight, SRCCOPY)
-
- ' Copy rightmost part of left half of original dest
- ' picture to left side of work picture
- X = BitBlt(Work.hDC, 0, 0, TempWidth, DestHeight, Work2.hDC, (DestWidth \ 2) - TempWidth, 0, SRCCOPY)
-
- ' Copy leftmost part of right half of original dest
- ' picture to right side of work picture
- X = BitBlt(Work.hDC, DestWidth - TempWidth, 0, TempWidth, DestHeight, Work2.hDC, (DestWidth \ 2), 0, SRCCOPY)
-
- ' Finally, copy entire Work to Dest
- X = BitBlt(Dest.hDC, 0, 0, DestWidth, DestHeight, Work.hDC, 0, 0, SRCCOPY)
-
- TempWidth = TempWidth - WidthFactor!
- If TempWidth < 1 Then
- Exit For
- End If
- Next
-
- ' Finally, copy Source to Dest in case last copy above was not full copy
- FinalStretch Source, Dest
-
- End Sub
-
- Sub MhHCurtainClose (Source As Control, Dest As Control, Work As Control, Work2 As Control)
-
- Const Cycles = 24 ' Number of cycles per effect
- FixupSizes Dest, Work, Work2
- ' Copy the dest picture to the work2 picture
- MhStretchBlt Source, Work2
- X = DoEvents() ' Make sure the sizes "take"
-
- ' Get our working values
- CalculateValues Source, Dest, Cycles
- For LoopCounter = 1 To Cycles
- ' Copy Dest picture to Work picture
- X = BitBlt(Work.hDC, 0, 0, DestWidth, DestHeight, Dest.hDC, 0, 0, SRCCOPY)
-
- ' Copy bottommost part of top half of source
- ' picture to top side of work picture
- X = BitBlt(Work.hDC, 0, 0, DestWidth, TempHeight, Work2.hDC, 0, (DestHeight \ 2) - TempHeight, SRCCOPY)
-
- ' Copy topmost part of bottom half of source
- ' picture to bottom of work picture
- X = BitBlt(Work.hDC, 0, DestHeight - TempHeight, DestWidth, TempHeight, Work2.hDC, 0, (DestHeight \ 2), SRCCOPY)
-
- ' Finally, copy entire Work to Dest
- X = BitBlt(Dest.hDC, 0, 0, DestWidth, DestHeight, Work.hDC, 0, 0, SRCCOPY)
-
- TempHeight = TempHeight + HeightFactor!
- If TempHeight * 2 > DestHeight Then
- Exit For
- End If
- Next
-
- ' Finally, copy Source to Dest in case last copy above was not full copy
- FinalStretch Source, Dest
-
- End Sub
-
- Sub MhHCurtainOpen (Source As Control, Dest As Control, Work As Control, Work2 As Control)
-
- Const Cycles = 24 ' Number of cycles per effect
- FixupSizes Dest, Work, Work2
- ' Copy the dest picture to the work2 picture
- MhStretchBlt Dest, Work2
- X = DoEvents() ' Make sure the sizes "take"
-
- ' Get our working values
- CalculateValues Source, Dest, Cycles
- TempHeight = DestHeight \ 2 - WidthFactor
- For LoopCounter = 1 To Cycles
- ' Copy Source picture to Work picture
- X = StretchBlt(Work.hDC, 0, 0, DestWidth, DestHeight, Source.hDC, 0, 0, SourceWidth, SourceHeight, SRCCOPY)
-
- ' Copy bottommost part of top half of original dest
- ' picture to top of work picture
- X = BitBlt(Work.hDC, 0, 0, DestWidth, TempHeight, Work2.hDC, 0, DestHeight \ 2 - TempHeight, SRCCOPY)
-
- ' Copy topmost part of bottom half of source
- ' picture to bottom of work picture
- X = BitBlt(Work.hDC, 0, DestHeight - TempHeight, DestWidth, TempHeight, Work2.hDC, 0, DestHeight \ 2, SRCCOPY)
-
- ' Finally, copy entire Work to Dest
- X = BitBlt(Dest.hDC, 0, 0, DestWidth, DestHeight, Work.hDC, 0, 0, SRCCOPY)
-
- TempHeight = TempHeight - HeightFactor!
- If TempHeight < 1 Then
- Exit For
- End If
- Next
-
- ' Finally, copy Source to Dest in case last copy above was not full copy
- FinalStretch Source, Dest
-
- End Sub
-
- Sub MhFxDelay (Delay As Integer)
-
- ' This Sub simply causes a delay between BitBlt
- ' calls in order to slow down the special effects
- For I% = 1 To Delay
- Next
-
- End Sub
-
- Sub FinalStretch (Src As Control, Des As Control)
- Des.AutoRedraw = MhTrue ' Cause VB to save
- MhStretchBlt Src, Des
- Des.Refresh
- Des.AutoRedraw = SaveRedraw ' Restore state you passed
- End Sub
-
-