Fade in & Fade out Form

alfa6661
- December 05, 2011
0 (0 votes)
Rate :
Efek fade in dan fade out pada form visual basic .net

Buatlah sebuah form seperti pada gambar diatas dengan 2 Buah Button. Ubah Properties Name dari Button 1 menjadi BtnIn dan Button 2 menjadi BtnOut.

Lalu double klik pada BtnIn, dan tuliskan script berikut ini

Dim iCount As Integer
 
For iCount = 0 To 100 Step +2
    Me.Opacity = iCount / 100
    Me.Refresh()
    Threading.Thread.Sleep(50)
Next

Lalu pada BtnOut Copykan script ini

Dim iCount As Integer
For iCount = 100 To 10 Step -2
    Me.Opacity = iCount / 100
    Me.Refresh()
    Threading.Thread.Sleep(50)
Next
Me.Close()

Computer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter

– Eric S. Raymond

Have a better explanation?

If you have comments about this post. Please write your comments below

No comments associated with this article