You are viewing our Forum Archives. To view or take place in current topics click here.
Visual Basic Help!
Posted:
Visual Basic Help!Posted:
Status: Offline
Joined: Apr 14, 201113Year Member
Posts: 252
Reputation Power: 9
Status: Offline
Joined: Apr 14, 201113Year Member
Posts: 252
Reputation Power: 9
I can't seem to find a way how to make the list interactive and editable. I also want a button to add the information that is in the Text boxes to the Array list.
Thanks in Advance
Here is my code
Thanks in Advance
Here is my code
Public Class Form1
Private myPlayer As New ArrayList
Private Structure Player
'Public variables
Public PlayerName As String
Public SteamID As String
Public Warning As String
Public KickBans As String
Public Overrides Function ToString() As String
Return PlayerName & " (" & SteamID & ")"
End Function
End Structure
Private objPlayer As Player
Private objNewplayer As Player
Private Sub AddPlayer(ByVal PlayerName As String, ByVal SteamID As String, ByVal Warning As String, ByVal KickBans As String)
Dim objNewPlayer As Player
objNewPlayer.PlayerName = PlayerName
objNewPlayer.SteamID = SteamID
objNewPlayer.Warning = Warning
objNewPlayer.KickBans = KickBans
myPlayer.Add(objNewPlayer)
ListBox1.Items.Add(objNewPlayer.ToString)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
AddPlayer("Dava", "STEAM_0:0:65213432", "", "")
AddPlayer("", "", "", "")
AddPlayer("", "", "", "")
End Sub
Private Sub DisplayPlayer(ByVal play As Player)
PlayerName.Text = play.PlayerName
SteamID.Text = play.SteamID
Warnings.Text = play.Warning
KicksBans.Text = play.KickBans
End Sub
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
End Sub
End Class
#2. Posted:
Status: Offline
Joined: Apr 14, 201113Year Member
Posts: 252
Reputation Power: 9
Status: Offline
Joined: Apr 14, 201113Year Member
Posts: 252
Reputation Power: 9
Bump I need help as soon as possible
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.