How do I automatically update a Private Sub _PAINEL_VENDAS_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
and an event for example button
?
Do I have to use a timer?
How do I automatically update a Private Sub _PAINEL_VENDAS_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
and an event for example button
?
Do I have to use a timer?
Try this:
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
' Aqui seu codigo do botao
End Sub
Private Sub _PAINEL_VENDAS_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Dim timer = New Timer
timer.Interval = 2 * 1000 ' 2 segundos
AddHandler timer.Tick, AddressOf Button1_Click
timer.Start()
End Sub