|
-
Oct 26th, 2006, 06:08 PM
#1
Thread Starter
Member
[RESOLVED] picture box help
I am trying to find a way to basically check that if all picture boxs are black then you have completed the game
i am looking for somthing along the lines of
VB Code:
If PIC_ALLSET = 33554431 Then
MsgBox ("congratulations you took : " & sec & " seconds")
Else
End If
but this does not work for some reason
Thank for help in advance
Daniel o/
-
Oct 26th, 2006, 06:23 PM
#2
Addicted Member
Re: picture box help
VB Code:
If Picture1.BackColor = vbBlack Then
MsgBox ("congratulations you took : " & sec & " seconds")
End If
-
Oct 26th, 2006, 06:34 PM
#3
Re: picture box help
IF there are multiple boxes, are they in an array?
If so, you could just cycle through each one with a For loop and set a boolean variable that tells you if any of them are not black.
-
Oct 26th, 2006, 06:49 PM
#4
Thread Starter
Member
Re: picture box help
can u give a example of what you mean please didnt quite uderstand what u was getting at then timeshifter
thnx
-
Oct 26th, 2006, 06:55 PM
#5
Addicted Member
Re: picture box help
This may work ,
If you have 10 Pictureboxes :
VB Code:
Dim i As Integer , x As Integer
For i = 0 to 9
If Picture1(i).BackColor = vbBlack then x =x +1
Next
if x = 10 then MsgBox ("congratulations you took : " & sec & " seconds")
-
Oct 26th, 2006, 07:26 PM
#6
Thread Starter
Member
Re: picture box help
yeh that works cheers for the help o/
[Resolved]
Dan
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
|