Timer Control in VB.NET

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • curious

    #1

    Timer Control in VB.NET

    I am new to VB.NET and I need help in using timer control. Here is
    the scenario. I have 3 labels (label 1, label2, label 3), and a start
    button, all vertically aligned on the form.

    Using a timer control with interval value of 3000, i.e 3 second, I
    want to accomplish the following:

    - Initially, only START button is visible to the user, i.e the 3
    labels are set to be invisible.
    - When click on START button, the button disappear and label 3
    appears.
    - After 3 seconds, the label 3 disappear and label 2 appears.
    - After 3 seconds, the label 2 disappear and label 1 appears.
    - After 3 seconds, the label 1 disappear and the form closes.

    I am setting timer control's Enable property to "True" in Design
    time.
    I am setting timer control's Interval property value to 3000 in
    Design Time.

    I assume that I do all the coding in START button's click event,
    starting with making START button invisible when a user clicks it.

    Can anyone help me code what I want to accomplish?
  • Randy Birch

    #2
    Re: Timer Control in VB.NET

    This group is pretty well targeting VB5 and VB6 ... you might want to try
    one of these or some of the many other similarly-named groups devoted
    exclusively to .net programming:

    news://msnews.microsoft.com/microsof...dotnet.general
    news://msnews.microsoft.com/microsof...t.languages.vb
    news://msnews.microsoft.com/microsof....vsnet.general
    news://msnews.microsoft.com/microsof...studio.general
    news://msnews.microsoft.com/microsof....vstudio.setup

    --

    Randy Birch
    MVP Visual Basic

    Please respond only to the newsgroups so all can benefit.


    "curious" <heyimjustcurio us@yahoo.com> wrote in message
    news:ca3e516b.0 408301802.23ed5 bda@posting.goo gle.com...
    :I am new to VB.NET and I need help in using timer control. Here is
    : the scenario. I have 3 labels (label 1, label2, label 3), and a start
    : button, all vertically aligned on the form.
    :
    : Using a timer control with interval value of 3000, i.e 3 second, I
    : want to accomplish the following:
    :
    : - Initially, only START button is visible to the user, i.e the 3
    : labels are set to be invisible.
    : - When click on START button, the button disappear and label 3
    : appears.
    : - After 3 seconds, the label 3 disappear and label 2 appears.
    : - After 3 seconds, the label 2 disappear and label 1 appears.
    : - After 3 seconds, the label 1 disappear and the form closes.
    :
    : I am setting timer control's Enable property to "True" in Design
    : time.
    : I am setting timer control's Interval property value to 3000 in
    : Design Time.
    :
    : I assume that I do all the coding in START button's click event,
    : starting with making START button invisible when a user clicks it.
    :
    : Can anyone help me code what I want to accomplish?

    Comment

    • curious

      #3
      Re: Timer Control in VB.NET

      "Randy Birch" <rgb_removethis @mvps.org> wrote in message news:<FeTYc.150 $%ER1.65@news04 .bloor.is.net.c able.rogers.com >...[color=blue]
      > This group is pretty well targeting VB5 and VB6 ... you might want to try
      > one of these or some of the many other similarly-named groups devoted
      > exclusively to .net programming:
      >
      > news://msnews.microsoft.com/microsof...dotnet.general
      > news://msnews.microsoft.com/microsof...t.languages.vb
      > news://msnews.microsoft.com/microsof....vsnet.general
      > news://msnews.microsoft.com/microsof...studio.general
      > news://msnews.microsoft.com/microsof....vstudio.setup
      >[/color]

      Thanks a lot. I appreciate it.

      [color=blue]
      > --
      >
      > Randy Birch
      > MVP Visual Basic
      > http://vbnet.mvps.org/
      > Please respond only to the newsgroups so all can benefit.
      >
      >
      > "curious" <heyimjustcurio us@yahoo.com> wrote in message
      > news:ca3e516b.0 408301802.23ed5 bda@posting.goo gle.com...
      > :I am new to VB.NET and I need help in using timer control. Here is
      > : the scenario. I have 3 labels (label 1, label2, label 3), and a start
      > : button, all vertically aligned on the form.
      > :
      > : Using a timer control with interval value of 3000, i.e 3 second, I
      > : want to accomplish the following:
      > :
      > : - Initially, only START button is visible to the user, i.e the 3
      > : labels are set to be invisible.
      > : - When click on START button, the button disappear and label 3
      > : appears.
      > : - After 3 seconds, the label 3 disappear and label 2 appears.
      > : - After 3 seconds, the label 2 disappear and label 1 appears.
      > : - After 3 seconds, the label 1 disappear and the form closes.
      > :
      > : I am setting timer control's Enable property to "True" in Design
      > : time.
      > : I am setting timer control's Interval property value to 3000 in
      > : Design Time.
      > :
      > : I assume that I do all the coding in START button's click event,
      > : starting with making START button invisible when a user clicks it.
      > :
      > : Can anyone help me code what I want to accomplish?[/color]

      Comment

      • Hal Rosser

        #4
        Re: Timer Control in VB.NET

        each time the tick event fires, add to a variable,
        use an if statement to check the variable then set properties.

        "curious" <heyimjustcurio us@yahoo.com> wrote in message
        news:ca3e516b.0 408301802.23ed5 bda@posting.goo gle.com...[color=blue]
        > I am new to VB.NET and I need help in using timer control. Here is
        > the scenario. I have 3 labels (label 1, label2, label 3), and a start
        > button, all vertically aligned on the form.
        >
        > Using a timer control with interval value of 3000, i.e 3 second, I
        > want to accomplish the following:
        >
        > - Initially, only START button is visible to the user, i.e the 3
        > labels are set to be invisible.
        > - When click on START button, the button disappear and label 3
        > appears.
        > - After 3 seconds, the label 3 disappear and label 2 appears.
        > - After 3 seconds, the label 2 disappear and label 1 appears.
        > - After 3 seconds, the label 1 disappear and the form closes.
        >
        > I am setting timer control's Enable property to "True" in Design
        > time.
        > I am setting timer control's Interval property value to 3000 in
        > Design Time.
        >
        > I assume that I do all the coding in START button's click event,
        > starting with making START button invisible when a user clicks it.
        >
        > Can anyone help me code what I want to accomplish?[/color]


        ---
        Outgoing mail is certified Virus Free.
        Checked by AVG anti-virus system (http://www.grisoft.com).
        Version: 6.0.744 / Virus Database: 496 - Release Date: 8/24/2004


        Comment

        • curious

          #5
          Re: Timer Control in VB.NET

          "Hal Rosser" <hmrosser@bells outh.net> wrote in message news:<2JaZc.654 71$_h.30761@big news3.bellsouth .net>...[color=blue]
          > each time the tick event fires, add to a variable,
          > use an if statement to check the variable then set properties.[/color]

          Thanks.

          <Snip>

          Comment

          Working...