Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. Dim tempContentor As String
  2.  
  3. tempContentor = MaskedTextBox1.Text
  4.  
  5. If tempContentor.Length <> 0 Then
  6. Dim encRemov As String = "Nao"
  7. Dim y As Integer = -1
  8.  
  9. While encRemov = "Nao" And y < cont_pilha
  10. y = y + 1
  11.  
  12. If pilha(y) = tempContentor Then
  13. encRemov = "Sim"
  14. End If
  15. End While
  16. If encRemov = "Nao" Then
  17. MessageBox.Show("O contentor não está registado!!!!", "Alerta", MessageBoxButtons.OK, MessageBoxIcon.Warning)
  18. ElseIf encRemov = "Sim" Then
  19. For i = y To cont_pilha - 1
  20. pilha(i) = pilha(i + 1)
  21. Next
  22. cont_pilha = cont_pilha - 1
  23. ReDim Preserve pilha(cont_pilha)
  24. ListBox1.Items.Clear()
  25. For i = 0 To cont_pilha
  26. ListBox1.Items.Add(pilha(i))
  27. Next
  28. End If
  29.  
  30. MaskedTextBox1.Clear()
  31. TextBox1.Text = cont_pilha + 1
  32.  
  33. Else
  34. MessageBox.Show("Preencha o nome do contentor!!!!!!!", "Alerta", MessageBoxButtons.OK, MessageBoxIcon.Warning)
  35. End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement