Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 423

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 423

Warning: Cannot modify header information - headers already sent by (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 426

Warning: Cannot modify header information - headers already sent by (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/templates/ja_purity/ja_templatetools.php on line 49
Fade in effect in VB.NET - The Scripts Library Community

Free Programming Tutorials & Source Code

 
  • Increase font size
  • Default font size
  • Decrease font size
Home Visual Basic.NET Fade in effect in VB.NET

Fade in effect in VB.NET

E-mail
(2 votes, average: 4.50 out of 5)

Sometimes you need to add some special effect so you windows application will look nicer. Fade in effect occurs when you load a form.

Here is the code of how to use this effect in your windows forms:


 
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Opacity = 0
tr.Enabled = True
End Sub


As you see in the code above, you need to add a time to your form. Then write the following for the Timer Trick event:


Private Sub tr_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tr.Tick
Me.Opacity += 0.05
If Me.Opacity = 1 Then
tr.Enabled = False
End If
End Sub


fadein


You may also consider using this code as Fade Out effects. Simply call it whenever the form unloads or closes.

That's it!