How to Program a Fading Form
In this tutorial we are going to transform the form in to a fading form.
Step 1:
Create a form and add a Picture Box then add a any image you want and set the FormBorderStyle Properties to None in your Form.
Here’s mine:
Step 2:
Copy and Paste the code:
Step 1:
Create a form and add a Picture Box then add a any image you want and set the FormBorderStyle Properties to None in your Form.
Here’s mine:
Step 2:
Copy and Paste the code:
Public Class frmFadeDim count As IntegerPrivate Sub frmFade_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LoadFor counter = 0 To 100 Step 10count = counterMe.Opacity = count / 100Me.Refresh()Threading.Thread.Sleep(100)Next counterThreading.Thread.Sleep(1000)For counters = 100 To 0 Step -10count = countersMe.Opacity = count / 100Me.Refresh()Threading.Thread.Sleep(100)Next countersMe.Close()End SubEnd Class
To be able to view
the output and make it fade, just run the program. Enjoy!
How to Program a Fading Form
Reviewed by code-dev
on
10:53 AM
Rating:
No comments: