Color Picker TSR - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Prolific Programmers (https://qb64phoenix.com/forum/forumdisplay.php?fid=26) +---- Forum: SMcNeill (https://qb64phoenix.com/forum/forumdisplay.php?fid=29) +---- Thread: Color Picker TSR (/showthread.php?tid=3416) |
Color Picker TSR - SMcNeill - 01-24-2025 Code: (Select All)
I don't know if TSR is the proper term for this type of program nowadays, but back in the yesteryears of the past these type of tools were called Terminate and Stay Resident programs. Not that without a title bar and without any easy exit commands, this little program doesn't terminate and quit very easily on you now. You'll probably need to go into task manager to manually stop it, so keep that in mind. If you're not comfortable with manual program stopping then... why the heck are you into programming? This works just like before except I've made some important changes here. 1)To start with, this loads and runs and behaves exactly as the other version... 2)..until you hit CTRL-ALT-K (for Kolor Picker), where it will then hide itself and disappear completely off your computer... 3)..until you hit CTRL-ALT-K once again, where the tool will instantly reappear at command and be usable once more. Configure this to run in your windows startup and from now on, you'll always have a handle little CTRL-ALT-K color picker available for use on your machine! So why is this here instead of in the other topic? Basically so folks will take the time to read the fact that this doesn't ever terminate on its own. Start it up and it'll stay in your task list and do its thing forever more unless you manually close it yourself. For me, this is a system tool which I can make use of to always be able to grab the color code from whatever I see on my monitor. My personal plan is just to pop this into windows startup and then it'll just always be an extended system tool for me. I thought others might like the same (or at least to see how to do the same so they could write similar little programs for themselves.) For anyone who isn't familiar with how to make a program startup in windows, see the quick write up here: https://www.howtogeek.com/208224/how-to-add-a-program-to-startup-in-windows Any questions, just ask. RE: Color Picker TSR - SMcNeill - 01-24-2025 And a slightly less responsive version of the program which makes more use of hardware images and has a smaller memory footprint: Code: (Select All)
This uses about 0.2% of a CPU on my machine, according to task manager, so for something checking mouse and keyboard input 10 times per second and responding to it in the background, that seems like a decent amount to me. Feel free to tweak the _LIMIT if that's unacceptable on your system. Mem usage holds steady around 30mb or so... So 30mb of ram and 0.2% CPU on a single core to always have a color picker handy. That doesn't sound bad. RE: Color Picker TSR - Steffan-68 - 01-24-2025 Or you can add the following line to end the program with CTRL + ALT + Q. Code: (Select All)
RE: Color Picker TSR - Pete - 01-24-2025 +1 Pete RE: Color Picker TSR - SMcNeill - 01-24-2025 (01-24-2025, 05:58 PM)Steffan-68 Wrote: Or you can add the following line to end the program with CTRL + ALT + Q. I'd thought of doing something similar as well, but Windows has so many dang reserved keys and key combos, and then Word and Explorer and everything else has key combos reserved... In the end, I decided to keep my fingerprint as simple as possible and not not take another key combo for a possible conflict on anyone's system. The method I tend to use for termination (if I really want to terminate it) is: 1)CTRL-ALT-K to pop up the display with the hex values. 2)At this point there should be an icon down on the task bar representing it. Right click it and then "End Task". But with the minimal resources it uses, I don't think I'll ever really need to bother to terminate it completely. I like the idea of a quick and simple pop-up to get a color value for anything on my screen. (I'm still debating a CTRL-ALT-Right Click, or such, to trigger a "copy to clipboard" event for myself, so it'll store that value and I won't have to remember it and type it in elsewhere, but that too is debatable just for the number of already reserved combos and I'm not certain I'd actually want to overwrite my clipboard contents for something so minor. At most, it's just 8 letters to remember...) RE: Color Picker TSR - Pete - 01-24-2025 Alt + F4 is my go to for closing a program. Of course you'd better be certain the window you want to close is active. Pete |