Torna al Thread

Public Class Form1 Private WithEvents Timer As New Timer Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Fai in modo che l' evento Timer_Tick avvenga ogni secondo Timer.Interval = 1000 'Avii il Timer Timer.Start() End Sub Private Sub Timer_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer.Tick If Now.ToShortTimeString = Me.DateTimePicker1.Value.ToShortTimeString Then MsgBox("Ciao") End If End Sub End Class
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5