|
-
May 6th, 2002, 04:37 AM
#1
Thread Starter
Member
yet another problem :(
ok - i have two images on the form if i click on ont of them it should dissapear and somewhere on a label to be displayed as 1 and if i click on the next image also to dissapear and the label to show 2 HELP..
-
May 6th, 2002, 04:40 AM
#2
-= B u g S l a y e r =-
?
could u elaborate a bit ?
-
May 6th, 2002, 04:43 AM
#3
Banned
Assuming your images are called Picture1 and Picture2:
VB Code:
Private Sub Picture1_Click()
Picture1.Visible = False
Label.Caption = "1"
'make the other picture visible again (Don't know if neccesary)
Picture2.Visible = True
End Sub
Private Sub Picture2_Click()
Picture2.Visible = False
Label.Caption = "2"
'make the other picture visible again (Don't know if neccesary)
Picture1.Visible = True
End Sub
-
May 6th, 2002, 04:46 AM
#4
Thread Starter
Member
but what if i have 50 (for example) pictures? The code would be huge. I need something like if another piture is hidden then label +1 ?
-
May 6th, 2002, 04:48 AM
#5
use control array and use the index value to display in label
-
May 6th, 2002, 04:49 AM
#6
Banned
Then you should call all the picture different. Like this:
Picture(0), Picture(1), Picture(x).
-
May 6th, 2002, 05:25 AM
#7
Private Sub Picture1_Click(Index As Integer)
Picture1(index).Visible = False
Label.Caption = index
'make the other picture visible again (Don't know if neccesary)
End Sub
if u want to make the rest picture visible u can loop....
-
May 6th, 2002, 05:25 AM
#8
Private Sub Picture1_Click(Index As Integer)
Picture1(index).Visible = False
Label.Caption = index
'make the other picture visible again (Don't know if neccesary)
End Sub
if u want to make the rest picture visible u can loop....
and set the visible =true
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|