Welcome to Dream.In.Code
Become a VB Expert!

Join 149,953 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,335 people online right now. Registration is fast and FREE... Join Now!




Concatenate Code

 
Reply to this topicStart new topic

Concatenate Code, Hello I'm new to this site

RLBispo
8 Jan, 2008 - 09:43 PM
Post #1

New D.I.C Head
*

Joined: 8 Jan, 2008
Posts: 5

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! code.gif

This post has been edited by Martyr2: 8 Jan, 2008 - 10:04 PM
User is offlineProfile CardPM
+Quote Post

born2c0de
RE: Concatenate Code
9 Jan, 2008 - 11:27 PM
Post #2

printf("I'm a %XR",195936478);
Group Icon

Joined: 26 Nov, 2004
Posts: 4,029



Thanked: 38 times
Dream Kudos: 2800
Expert In: 80x86 Assembly, C/C++, VB6, VB.NET, C#, J2SE, Win32 API, Reversing

My Contributions
I haven't quite understood what you are trying to achieve.
Please elaborate.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 05:51PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month