6 Replies - 2049 Views - Last Post: 03 February 2013 - 05:17 AM Rate Topic: -----

#1 mr.nacho  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 28-December 12

[QUESTION] VB6 Progress Bar

Posted 02 February 2013 - 07:13 AM

How can I determine the length of what I'm copying using progress bar? How can I sync it? Please help me. Thanks.
Is This A Good Question/Topic? 0
  • +

Replies To: [QUESTION] VB6 Progress Bar

#2 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3227
  • View blog
  • Posts: 10,840
  • Joined: 12-December 12

Re: [QUESTION] VB6 Progress Bar

Posted 02 February 2013 - 07:49 AM

There is a simple guide to the progress bar here.

To synchronise you need to know the total length of what you are copying. Then divide the range of the progress bar by this length. But if you need more specific information then you will need to show some code.

If you are copying a file for instance, and the range of the progress bar is 0..100 then you would use something like
progressbar.value = int(fileloaded / filesize * 100)

in the Timer interval.

This post has been edited by andrewsw: 02 February 2013 - 07:52 AM

Was This Post Helpful? 2
  • +
  • -

#3 mr.nacho  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 28-December 12

Re: [QUESTION] VB6 Progress Bar

Posted 02 February 2013 - 08:00 PM

View Postandrewsw, on 02 February 2013 - 07:49 AM, said:

There is a simple guide to the progress bar here.

To synchronise you need to know the total length of what you are copying. Then divide the range of the progress bar by this length. But if you need more specific information then you will need to show some code.

If you are copying a file for instance, and the range of the progress bar is 0..100 then you would use something like
progressbar.value = int(fileloaded / filesize * 100)

in the Timer interval.



Sir, the link you gave does not exist. :(
Was This Post Helpful? 0
  • +
  • -

#4 maj3091  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 299
  • View blog
  • Posts: 1,768
  • Joined: 26-March 09

Re: [QUESTION] VB6 Progress Bar

Posted 03 February 2013 - 02:10 AM

The link does exist, you can see the actual page pop up before it says it can't find it.

Try this link.

If you signed up to the site, you could have browsed for it yourself.

Thanks Andrew for the site link, not one I was familiar with and always good to have multiple resources for learning.
Was This Post Helpful? 1
  • +
  • -

#5 mr.nacho  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 28-December 12

Re: [QUESTION] VB6 Progress Bar

Posted 03 February 2013 - 03:09 AM

View Postmaj3091, on 03 February 2013 - 02:10 AM, said:

The link does exist, you can see the actual page pop up before it says it can't find it.

Try this link.

If you signed up to the site, you could have browsed for it yourself.

Thanks Andrew for the site link, not one I was familiar with and always good to have multiple resources for learning.


Oh, ok thanks. Gotcha! :)
Was This Post Helpful? 0
  • +
  • -

#6 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3227
  • View blog
  • Posts: 10,840
  • Joined: 12-December 12

Re: [QUESTION] VB6 Progress Bar

Posted 03 February 2013 - 05:05 AM

I hadn't noticed the page I linked requiring a sign-up to the site. It's only a brief introduction so you might also want to search for other references.

The official MSDN page is this one. Although, again, it is a little brief.

Personally, I would search Amazon or similar and purchase a couple of books; we can pick them up for pennies!! Some of them come with a CD with the Learners Edition of VB6 which is the simplest way to get hold of a version of VB6.

http://www.vb6.us/ has a number of tutorials, although I didn't notice one for the ProgressBar, and they probably vary in quality.

Of course, you will receive excellent assistance here at DIC, but you are more likely to get assistance if you post some code, and ask a more specific question :whistling:/>

All this being said, the ProgressBar is straight-forward: set a minimum and maximum value and perhaps use the Timer control to change the value of the control between these, or update it directly within your long process-loop :sorcerer:

This post has been edited by andrewsw: 03 February 2013 - 05:13 AM

Was This Post Helpful? 0
  • +
  • -

#7 maj3091  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 299
  • View blog
  • Posts: 1,768
  • Joined: 26-March 09

Re: [QUESTION] VB6 Progress Bar

Posted 03 February 2013 - 05:17 AM

View Postandrewsw, on 03 February 2013 - 12:05 PM, said:

I hadn't noticed the page I linked requiring a sign-up to the site. It's only a brief introduction so you might also want to search for other references.


No, I don't think you do need to sign up for the link, just your link has some extra "bits" on the end, so it flashes up the correct page then said it didn't exist??

I was just saying, if the OP had signed up, it was easy enough to find in the VB tutorials.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1