Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
karuna
Oct 3, 2006
::Visual Basic::

How can i control the rate at which i change the properties of labels..
I'm trying to mimic a pump transferring water from one tank to another..
Each tank is made up of 10 tables.

At the form load, the right tank's labels all the visible = true and the left tank has visible = false...
I want to dynamically change the right tank's labels to visible = false and the left to true at X rate..

The problem I'm having is controlling the rate at which this happens... There are meant to be 5 different rates that the user can set.. rate 1 means it takes 10 seconds to change all the properties and rate 5, 2 seconds.

The other problem I'm having is that at the moment i have to directly state each label to change its properties..

Is there anyway i can say like
code:
Dim x As integer = 0

Do While (x < 10)
 lblLeftx.Visible = true
 lblRightx.Visible = false
 x+= 1
loop
What other ways can i go about solving this? I'm very new to vb..

Thanks in advance.

Adbot
ADBOT LOVES YOU

karuna
Oct 3, 2006
Just did a quick search there and it seems control arrays are no longer supported, I'm using visual basic 2008 express edition..
Would you know of any other way i can refer to the labels with a variable?

Cheers

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply