quarta-feira, 31 de julho de 2013

Progressbar com IF!

Usando o progressbar com if.
Monte o form como na imagem abaixo e não esqueça de colocar o label como eu fiz......rsrsrrs


Vamos a codificação:

  pgb.Value = pgb.Value + 10 
       If pgb.Value = 10 Then 
           lbl.Text = "Carregando 10%" 
       End If 
       If pgb.Value = 20 Then 
           lbl.Text = "Carregando... 20%" 
       End If 
       If pgb.Value = 30 Then 
           lbl.Text = "Carregando... 30%" 
       End If 
       If pgb.Value = 40 Then 
           lbl.Text = "Carregando... 40%" 
       End If 
       If pgb.Value = 50 Then 
           lbl.Text = "Carregando... 50%" 
       End If 
       If pgb.Value = 60 Then 
           lbl.Text = "Carregando... 60%" 
       End If 
        If pgb.Value = 70 Then 
            lbl.Text = "Carregando... 70%" 
        End If 
        If pgb.Value = 80 Then 
            lbl.Text = "Carregando... 80%" 
        End If 
        If pgb.Value = 90 Then 
            lbl.Text = "Carregando... 90%" 
        End If 
        If pgb.Value = 100 Then 
            lbl.Text = "Carregando... 100%" 
            MsgBox("Sistema carregado.", MsgBoxStyle.Information, "Atenção") 
        End If 

OBS: pgb é o nome do meu progressbar e lbl do meu label que mostro a mensagem.

Nenhum comentário:

Postar um comentário