Plain and simple, nice.:)
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
Thanx to Unhnd_Exception For a Mod.. Here is a sub that will work for all controls or forms when the form shows. There is a revision issue for the form based on your .NET version and/or the VB Studio version as the libraries handle the code diffrently. Kudos for the Mod!!
Private Sub FadeForm(ByVal TotalSeconds As Single)
If TotalSeconds = 0 Then
Me.Opacity = 1
Exit Sub
End If
Dim [then] As Double = DateAndTime.Timer
Dim difference As Double = 0
'difference is the percentage of the total seconds elapsed
Do While difference < 1
Me.Opacity = difference
difference = (DateAndTime.Timer - [then]) / TotalSeconds
System.Threading.Thread.Sleep(10)
Loop
Me.Opacity = 1
End Sub
Private Sub Form1_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
FadeForm(1.5)
End Sub
zinnqu
Junior Poster in Training
86 posts since Jun 2009
Reputation Points: 21
Solved Threads: 15
Code has been posted in the C# snippet forum today.
zinnqu
Junior Poster in Training
86 posts since Jun 2009
Reputation Points: 21
Solved Threads: 15