Advertisement
Shell01

Simular Barra de Progreso

Jul 11th, 2022
2,272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GAMBAS 0.58 KB | None | 0 0
  1. Public Sub Timer1_Timer()
  2.      
  3.   If lblBarra.W + lblBarra.x < FormBarraProgreso.W - lblBarra.X Then        
  4.     lblBarra.Width = lblBarra.Width + 5  'Aumentamos el ancho de la barra en 5,10,20...      
  5.   Else
  6.     Timer1.Stop 'Se para el Timer1
  7.   Endif
  8.  
  9. End
  10.  
  11. Public Sub btnIniciar_Click()
  12.  
  13.   'Inicializamos los valores  
  14.   Me.Caption = "Simula barra de progreso"
  15.   Me.Center
  16.    
  17.   'Podemos asignar estos valores en las propiedades de los componentes
  18.   lblBarra.Width = 0          
  19.   lblBarra.Background = Color.Blue  
  20.   Timer1.Delay = 50  
  21.   Timer1.Start
  22.  
  23. End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement