Private Sub Button1_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button1.Click 'ボタンを押すと、消えるフォームの処理開始 Timer1.Enabled = True End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Timer1.Tick '透明度が完全になるまで、タイマー処理を実行しています If Me.Opacity <= 0 Then Timer1.Enabled = False Me.Close() End If '透明になるまでのステップ値です。 Me.Opacity = Me.Opacity - 0.025 End Sub
Private Sub Form1_Load(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles MyBase.Load