VB.NET FORM 窗口 透明 显示 关闭 动画效果

FORM 窗口 透明 显示 关闭   动画效果

Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick

        Label1.Text = Val(Label1.Text) + 0.1
        If Val(Label1.Text) < "0.9" Then
            Me.Opacity = Label1.Text
        Else
            Me.Opacity = 1
            Label1.Text = "1"
            Timer1.Enabled = False
        End If


    End Sub


    Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
        Label1.Text = Val(Label1.Text) - 0.1
        If Val(Label1.Text) > "0.1" Then
            Me.Opacity = Label1.Text
        Else
            Label1.Text = "0.0"
            Timer2.Enabled = False
            Me.Close()
        End If
    End Sub


    Private Sub Label2_Click(sender As Object, e As EventArgs) Handles Label2.Click
        'Form1.Timer1.Enabled = True
        Timer2.Enabled = True
    End Sub

你可能感兴趣的:(VB.Net,.net)