Posto la soluzione, nel caso qualcun'altro abbia lo stesso problema.
********************
Inseriamo 2 Timer nella form: Timer1 e Timer2.
Impostiamo la proprietà Enabled di Timer1 su True.
Poi scriviamo il codice:
codice:Public Class Form1 Private Sub Timer1_Tick(_ ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles Timer1.Tick If Me.Opacity < 1 Then Me.Opacity = Me.Opacity + 0.1 Else Timer1.Enabled = False Timer2.Enabled = True End If End Sub Private Sub Timer2_Tick(_ ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles Timer2.Tick If Me.Opacity > 0.0 Then Me.Opacity = Me.Opacity - 0.1 Else Me.Close() End If End Sub End Class![]()


Rispondi quotando