nothinck happens
Yes it did! Thanks
No it didn't.
Hi, and welcome to my first tiny Visual Basic.Net tutorial.
In this tutorial i will show you how to let a form fade in and out.
First off all, you need to open Microsoft Visual Basic 2008 Express Edition and start a new Windows Form Application.
Now that you have made your form,
you will need to place a button. (for the fade out effect)
After you are done, your form should look like this:
Now double click your form and you should get this:
Now you have to put
betweenCode:Dim fadeinout As Double For fadeinout = 0 To 1.01 Step 0.01 Me.Opacity = fadeinout Next
so you should get this:Code:Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub End Class
Now press the 'Debug Button' to see the fade in effect:
and now your Form1 should fade in when you start it.
Now lets do the fade out effect with the button.(This can also be done for closing the form, but ill stick with the button for now)
You should have the folowing code atm:
Now double click your Button1 and this should appearCode:Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim fadeinout As Double For fadeinout = 0 To 1.01 Step 0.01 Me.Opacity = fadeinout Next End Sub End Class
PutCode:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click End Sub End Class
Between:Code:Dim fadeout As Double For fadeout = 1 To 0 Step -0.001 Me.Opacity = fadeout Next
And now you should have:Code:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click End Sub End Class
Now press the debug button again.Code:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim fadeout As Double For fadeout = 1 To 0 Step -0.001 Me.Opacity = fadeout Next End Sub End Class
And now your form will fade in and out!
I hope this tutorial helped you.
nothinck happens
Joe06 Backup
u only can´t see the button and the form 1 but nothing otheer happenz
Ammm it works BUT
When u click On the button.
The project gone
then
u cant close it
so its unusefull
Dident Helped Sorry
it worked for me
that is a cool tut u got there