“mobile”/ adcombo
Dismiss Notice
Welcome to Our Community
Wanting to join the rest of our members? Feel free to sign up today.

Add Fade In/Fade Out Effects in your VB Apps

Discussion in 'Guides, Case Studies and Tutorials' started by juzlee, Feb 4, 2016.

Tags:
  1. juzlee

    juzlee Affiliate affiliate

    86
    35
    18
    In this Tutorial, I will teach you how to add a Fade in/out effect when you are opening and closing your vb forms.

    Watch the code in action here


    What are the benefits of learning this?

    1. It will make you VB app more stunnning and HQ
    2. Will increase your Conversion Rate because users like HQ apps
    3. Super easy to learn

    Let's Start!
    Step 1: Copy the code below and paste it in your "public class Form 1" just like in the image below
    Code:
    'fade in
        Public Sub fade_in()
            For FadeIn = 0.0 To 1.1 Step 0.1
                Me.Opacity = FadeIn
                Me.Refresh()
                Threading.Thread.Sleep(100)
            Next
        End Sub
        'Fade out:
        Public Sub fade_out()
            For FadeOut = 90 To 10 Step -10
                Me.Opacity = FadeOut / 100
                Me.Refresh()
                Threading.Thread.Sleep(50)
            Next
        End Sub
    [​IMG]

    Step 2: double click on your form and add "fade_in()" inside the code just like in the image below

    [​IMG]

    Step 3: double click in your closing button and add "fade_out()" in the code just like in the image below.

    [​IMG]

    That's it! Don't forget to hit debug to test.
     

Top Resources

banners