Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim tempContentor As String
- tempContentor = MaskedTextBox1.Text
- If tempContentor.Length <> 0 Then
- Dim encRemov As String = "Nao"
- Dim y As Integer = -1
- While encRemov = "Nao" And y < cont_pilha
- y = y + 1
- If pilha(y) = tempContentor Then
- encRemov = "Sim"
- End If
- End While
- If encRemov = "Nao" Then
- MessageBox.Show("O contentor não está registado!!!!", "Alerta", MessageBoxButtons.OK, MessageBoxIcon.Warning)
- ElseIf encRemov = "Sim" Then
- For i = y To cont_pilha - 1
- pilha(i) = pilha(i + 1)
- Next
- cont_pilha = cont_pilha - 1
- ReDim Preserve pilha(cont_pilha)
- ListBox1.Items.Clear()
- For i = 0 To cont_pilha
- ListBox1.Items.Add(pilha(i))
- Next
- End If
- MaskedTextBox1.Clear()
- TextBox1.Text = cont_pilha + 1
- Else
- MessageBox.Show("Preencha o nome do contentor!!!!!!!", "Alerta", MessageBoxButtons.OK, MessageBoxIcon.Warning)
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement