CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2001
    Posts
    65

    How can I stop this timer...?

    Hi,

    In my game, I have 2 buttons called "Forward" and "Down".

    When I press the `Down`, my `Downward facing` image shows and starts to fall :

    Image.Pic = ImageFall.Pic
    Image.Top = Image.Top + 30

    But, when I then want to "Level off" and select my "Forward image" button :

    Image.Pic = ImageForward.Pic
    Image.Left = Image.Left + 5

    ... The forward facing image continues to fall, as in the first example.

    Is there anyway I can disconnect the timer for the "ImageFall", or is there a way to resolve this.

    Thanks

    Mark


  2. #2
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: How can I stop this timer...?

    Simply disable the timer like so

    Timer1.Enabled = false



    "Timer1" being the name of your timer.
    This will stop the timer. TO restart it do a .ENABLED = TRUE

    John G

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured