23 lines
712 B
VB.net
23 lines
712 B
VB.net
Public Class frmPopUp
|
|
|
|
Property CountdownStartSec As Int32
|
|
Property TimeOpen As Int32 = 0
|
|
Property Nachricht As String = ""
|
|
Property CountdownIsStarted As Boolean = True
|
|
|
|
Private Sub frmPopUp_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
MsgBox(Nachricht)
|
|
lblNachricht.Text = Nachricht
|
|
|
|
If CountdownIsStarted = True Then Timer1.Enabled = True
|
|
End Sub
|
|
|
|
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
|
|
TimeOpen = TimeOpen + 1
|
|
If CountdownStartSec > 0 Then
|
|
lblCountdown.Text = (CountdownStartSec - TimeOpen).ToString
|
|
Else
|
|
Me.Close()
|
|
End If
|
|
End Sub
|
|
End Class |