User_246

Carregando ProgressBar

Jul 6th, 2021 (edited)
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.63 KB | None | 0 0
  1. 'Componentes do form:
  2. '1 - Botão
  3. 'Texto: Executar
  4. 'Nome: btnExecutar
  5.  
  6. '1 - ProgressBar
  7. '======================================================================================
  8. Public Class Form1
  9.     Private Sub btnExecutar_Click(sender As Object, e As EventArgs) Handles btnExecutar.Click
  10.         Timer1.Start()
  11.     End Sub
  12.  
  13.     Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
  14.         ProgressBar1.Increment(1)
  15.  
  16.         If ProgressBar1.Value = "100" Then
  17.             Timer1.Stop()
  18.             ProgressBar1.Value = "0"
  19.             MsgBox("Carregamento Completo")
  20.         End If
  21.     End Sub
  22. End Class
Add Comment
Please, Sign In to add comment