Advertisement
hungcoder92

[VB.NET] Share the source code to create visual effects when converting images

Mar 19th, 2022
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 2.25 KB | None | 0 0
  1. Imports System.Drawing
  2.  
  3. Public Class TestForm
  4.  
  5.     Private bmp As New Bitmap(My.Resources.baby_5)
  6.  
  7.     Private Sub TestForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  8.         AnimationControl1.AnimatedFadeImage = Panel1.BackgroundImage
  9.         AnimationControl1.AnimatedImage = bmp
  10.     End Sub
  11.  
  12.     Private Sub btnSpiarlBoom_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSpiarlBoom.Click
  13.  
  14.         AnimationControl1.AnimationType = AnimationTypes.SpiralBoom
  15.         AnimationControl1.Animate(40)
  16.  
  17.     End Sub
  18.  
  19.     Private Sub btnSpin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSpin.Click
  20.  
  21.         AnimationControl1.AnimationType = AnimationTypes.Spin
  22.         AnimationControl1.Animate(60)
  23.  
  24.     End Sub
  25.  
  26.     Private Sub btnPanorama_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPanorama.Click
  27.  
  28.         AnimationControl1.AnimationType = AnimationTypes.Panorama
  29.         AnimationControl1.Animate(50)
  30.  
  31.     End Sub
  32.  
  33.     Private Sub btnSlide_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSlide.Click
  34.         AnimationControl1.AnimationType = AnimationTypes.BottomRightToTopLeft
  35.         AnimationControl1.Animate(30)
  36.  
  37.     End Sub
  38.  
  39.     Private Sub btnshape_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnshape.Click
  40.  
  41.         AnimationControl1.AnimationType = AnimationTypes.Rectangular
  42.         AnimationControl1.Animate(20)
  43.  
  44.     End Sub
  45.  
  46.     Private Sub btnSplit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSplit.Click
  47.  
  48.         AnimationControl1.AnimationType = AnimationTypes.SplitBoom
  49.         AnimationControl1.Animate(70)
  50.  
  51.     End Sub
  52.  
  53.     Private Sub btnChess_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnChess.Click
  54.  
  55.         AnimationControl1.AnimationType = AnimationTypes.ChessBoard
  56.         AnimationControl1.Animate(50)
  57.  
  58.     End Sub
  59.  
  60.     Private Sub btnFade_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFade.Click
  61.  
  62.         AnimationControl1.AnimationType = AnimationTypes.Fade2Images
  63.         AnimationControl1.Animate(30)
  64.  
  65.     End Sub
  66.  
  67. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement