2
How to get the fade-in and out effects, transitions, drives and etc, in forms and their controls in VB.NET, natively or using Frameworks?
2
How to get the fade-in and out effects, transitions, drives and etc, in forms and their controls in VB.NET, natively or using Frameworks?
1
It can be manipulating property Opacity
of the form to obtain this effect. Below is a example:
Public Sub fadeIn()
For fade = 0.0 To 1.1 Step 0.1
Me.Opacity = fade
Me.Refresh()
Threading.Thread.Sleep(100)
Next
End Sub
Public Sub fadeOut()
For fade = 90 To 10 Step -10
Me.Opacity = fade / 100
Me.Refresh()
Threading.Thread.Sleep(50)
Next
End Sub
At the events Form1_Load
and Form1_FormClosing
you do:
Private Sub Form1_Load(sender As Object, e As EventArgs)
Handles MyBase.Load
fadeIn()
End Sub
Private Sub Form1_FormClosing(sender As Object, e As FormClosingEventArgs)
Handles MyBase.FormClosing
fadeOut()
End Sub
Browser other questions tagged .net vb.net framework visual-basic-6 transition
You are not signed in. Login or sign up in order to post.
I posted only how to get the effects of fade in/out, other effects can be seen in the article Image Transition in VB.NET Windows Forms
– stderr