Results 1 to 2 of 2

Thread: Control ProgressBar With Button

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2008
    Posts
    1

    Control ProgressBar With Button

    Hi!

    I'm new to Visual Basic, so I'm going to be asking questions on a regular basis. For now, I have just one question. I'm programming a game in Visual Basic 2008 Express Edition and I need to know how to control a ProgressBar with a Button. However, I want it so that the ProgressBar starts full and then decreases with each click of a Button. Is this possible? If so, can someone please demonstrate how I would code this?

    Thanks you!

  2. #2
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: Control ProgressBar With Button

    The Value property of a ProgressBar is just an Integer telling the progressbar how what to display.

    So, you would set a Maximum value of 100.. and do something like this:
    vb Code:
    1. ProgressBar.Maximum = 100
    2.  
    3. ' Button click event..
    4. ProgressBar.Value -= 10

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

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