Recent

Author Topic: best way to use progressbar  (Read 766 times)

rcmz

  • Full Member
  • ***
  • Posts: 137
best way to use progressbar
« on: August 10, 2024, 07:26:27 pm »
hi,

any suggestion or samples to best use progressbar or jvSProgressbar

TIA
Ramiro

ASerge

  • Hero Member
  • *****
  • Posts: 2321
Re: best way to use progressbar
« Reply #1 on: August 11, 2024, 06:17:16 am »
any suggestion or samples to best use progressbar or jvSProgressbar
Best? Only the best... Sorry, I only know the usual usage.
1. Do long (hard) work in the thread and increase (by interlocked functions) progress variable.
2. Use the main thread. Increment the progress variable in the loop and call the Application.ProcessMessages.
In both cases use a timer (300 ms is fast enough for a normal user) to update the position of the ProgressBar control to the value of the progress variable.

rcmz

  • Full Member
  • ***
  • Posts: 137
Re: best way to use progressbar
« Reply #2 on: August 11, 2024, 07:52:53 pm »
thx

will give it a try.

Ramiro

Handoko

  • Hero Member
  • *****
  • Posts: 5290
  • My goal: build my own game engine using Lazarus
Re: best way to use progressbar
« Reply #3 on: August 11, 2024, 08:15:57 pm »

rcmz

  • Full Member
  • ***
  • Posts: 137
Re: best way to use progressbar
« Reply #4 on: August 12, 2024, 01:26:29 am »
thx

all ready downloded.

Ramiro

 

TinyPortal © 2005-2018