|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hey all, a question for those array experts...........
HOW DO I REPLACE ALL THIS; shpPOS3(0).BackColor = &HFFFFFF shpPOS3(1).BackColor = &HFFFFFF shpPOS3(2).BackColor = &HFFFFFF shpPOS3(3).BackColor = &HFFFFFF shpPOS3(4).BackColor = &HFFFFFF shpPOS3(5).BackColor = &HFFFFFF shpPOS3(6).BackColor = &HFFFFFF shpPOS3(7).BackColor = &HFFFFFF shpPOS3(8).BackColor = &HFFFFFF shpPOS3(9).BackColor = &HFFFFFF with something like this?? shpPOS3(0 - 9).BackColor = &HFFFFFF <----- (DOESNT WORK) This is in a timer too so it cant be set at the properties window.. --------------Meza2 thanx |
|
#2
|
||||
|
||||
|
well, if you're going to be using the same hex value over and over, then just use a loop....
Code:
dim shpPOS3(9) as string
dim i as integer
for i = 0 to ubound(shpPOS3)
shpPOS3(i) = &HFFFFFF
next i
__________________
Fisherman "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." - A.Einstein |
|
#3
|
||||
|
||||
|
Please read the sticky thread at the top of this forum on how to post a question. In the future you need to strive towards better subject titles.
|
|
#4
|
|||
|
|||
|
Hey Thanx Fisherman, exactly what i needed, but also do u have one that could do the same but, not in a timer? or set at properties? (it is for a cmdButton) or should i just run a timer (with ur code in it) whenver cmdButton is pressed?......Thankyou for any help....
MEZADOG--------- |
|
#5
|
||||
|
||||
|
well, if you're using it in a cmdbutton, then I don't see the need for including a timer at all... but then, I don't understand what this code is doing in your project. Can you ellaborate on that a little?
|
|
#6
|
||||
|
||||
|
I'm just a little confused here, where do you see a timer?
|
|
#7
|
||||
|
||||
|
the original code was placed inside a timer event, though I'm not sure why just yet, Onslaught.
|
|
#8
|
||||
|
||||
|
Ok, must have missed that bit of the conversation.
|
|
#9
|
|||
|
|||
|
Hey all.... What i am actually doing is making a board game... and the shape Positions 3 and 4 (shpPOS3) are where the player token or thingy is... im using shape as spaces or counts, there fore once the dice has been rolled, the timer goes and adds the dice, moves the position place or token ahead by that amount, but the timer is the thing that moves the token to the desired space so it doesnt just apear on the (x)th space it actually animates the move (x) places forward, making the shape (the place were the token is) a diff colour and the rest of the spaces has to be changed back to original, other wise u get a trail of were u token has been THATs why i needed the timer, BUT i also added a command button for RESET (to reset all values to 0 so i needed to change all spaces bak to orig colour) and a NEW GAME command button which also needs to change all spaces to orig colour, Thankyou for your help all......
P.s. That was like the longest post i ever did.....lol |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Array and stuff |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|