Posted By

jimmykobe48 on 11/10/10


Tagged


Versions (?)

12312312


 / Published in: Visual Basic
 

  1. Public Sub MoveSelAllToAvail()
  2. If frmMainForm.lstSelectedPlayers.Items.Count <> 0 Then
  3. Do While frmMainForm.lstSelectedPlayers.Items.Count <> 0
  4. frmMainForm.lstAvailablePlayers.Items.Insert(0, frmMainForm.lstSelectedPlayers.Items(0))
  5. frmMainForm.lstSelectedPlayers.Items.RemoveAt(0)
  6. Loop
  7. Else
  8. MessageBox.Show("There are no players to move.", _
  9. "Data validation...", _
  10. MessageBoxButtons.OK)
  11. Exit Sub
  12. End If
  13. End Sub
  14.  
  15. Public Sub DeletePlayer()
  16. With frmMainForm
  17. If frmMainForm.lstAvailablePlayers.SelectedIndex <> -1 Then
  18. frmMainForm.lstAvailablePlayers.Items.RemoveAt(frmMainForm.lstAvailablePlayers.SelectedIndex)
  19. Else
  20. MessageBox.Show("First Select a player.",
  21. "No Selection Made",
  22. MessageBoxButtons.OK,
  23. MessageBoxIcon.Exclamation)
  24. End If
  25. End With
  26. End Sub

Report this snippet  

You need to login to post a comment.