VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Handbrake

by GDuncan (5 Submissions)
Category: Custom Controls/Forms/Menus
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (3 Votes)

The screenshot should give you a good idea of what this control does. It slows down your code. It's like a DoEvents you can manage. Great for background tasks.
I had an app that needed to do database maintenance to a very large number of records. Firing the maintence sub caused the cpu to run at 100% for several minutes during which time the user could not do anything as their system all but locked up. Hence this handbrake. Using it you can run your process in the background without causing the user any inconvenience. If you set CPULimit to 0 it will introduce a one second wait into each itteration of your loop. This will create a burst effect where your routine does a process, then waits for 1 second, then does another burst etc. Alternativly you can set CPULimit to the maximum level at which your app can process to. So you could create a situation such as... do the work, but dont exceed 10% of the cpu useage. If the user is doing something then the control will just hold your app suspended until CPU useage falls, or if the user isnt using the CPU then your app can grab it and process in the background. It is important to structure your loop properly. See sample for how to use.

Rate Handbrake

Download Handbrake

Download Handbrake (14 KB)

Handbrake Comments

No comments have been posted about Handbrake. Why not be the first to post a comment about Handbrake.

Post your comment

Subject:
Message:
0/1000 characters