Fadein and out Effect in VB.Net
  • Fadein and out Effect in VB.Net
    for further details and related topics http://www.codecorner.somee.com/
  • 1 Comment sorted by



  • Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    fade_in()
    End Sub

    'Handle Fade Out of form
    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
    fade_out()
    End Sub

    '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

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Popular Posts of the Week

    Optimum Creative