Hello, i'm very srry if i have done anything wrong in posting this thread, i'm 16 years old and i am taking a visual basics 6.0 class and i am making a project that mix and matches images, and i want to add code that will allow u to name your character, and i would appreciate your help, thank u.
CODE
Dim intHead As Integer
Dim intBody As Integer
Dim intLegs As Integer
Option Explicit
Dim intCompChoice As Integer
Private Sub cmdClear_Click()
'Zach Bispo
'when clear is clicked the images dissapear
imgHead(0).Visible = False
imgHead(1).Visible = False
imgHead(2).Visible = False
imgHead(3).Visible = False
imgHead(4).Visible = False
imgBody(0).Visible = False
imgBody(1).Visible = False
imgBody(2).Visible = False
imgBody(3).Visible = False
imgBody(4).Visible = False
imgLegs(0).Visible = False
imgLegs(1).Visible = False
imgLegs(2).Visible = False
imgLegs(3).Visible = False
imgLegs(4).Visible = False
End Sub
Private Sub Form_Load()
'when the game loads images are not visible
imgHead(0).Visible = False
imgHead(1).Visible = False
imgHead(2).Visible = False
imgHead(3).Visible = False
imgHead(4).Visible = False
imgBody(0).Visible = False
imgBody(1).Visible = False
imgBody(2).Visible = False
imgBody(3).Visible = False
imgBody(4).Visible = False
imgLegs(0).Visible = False
imgLegs(1).Visible = False
imgLegs(2).Visible = False
imgLegs(3).Visible = False
imgLegs(4).Visible = False
End Sub
Private Sub lstBody_Click()
For i = 0 To 4
'images are not visible until clicked
imgBody(0).Visible = False
imgBody(1).Visible = False
imgBody(2).Visible = False
imgBody(3).Visible = False
imgBody(4).Visible = False
Next i
'when choice is clicked, makes image visible
imgBody(lstBody.ListIndex).Visible = True
End Sub
Private Sub lstHead_Click()
For i = 0 To 4
'images are not visible until clicked
imgHead(0).Visible = False
imgHead(1).Visible = False
imgHead(2).Visible = False
imgHead(3).Visible = False
imgHead(4).Visible = False
Next i
'when choice is clicked, makes image visible
imgHead(lstHead.ListIndex).Visible = True
End Sub
Private Sub lstLegs_Click()
For i = 0 To 4
'images are not visible until clicked
imgLegs(0).Visible = False
imgLegs(1).Visible = False
imgLegs(2).Visible = False
imgLegs(3).Visible = False
imgLegs(4).Visible = False
Next i
'when choice is clicked, makes image visible
imgLegs(lstLegs.ListIndex).Visible = True
End Sub
*edit: Please use code tags when posting code in the future. Thanks!
This post has been edited by Martyr2: 8 Jan, 2008 - 10:04 PM