Or grab a copy of WinButtons
, that even has a nice configuration editor WinButtonEdit, and can easily be configured to be Always On Top
I looked quite hard at it. I think if I was starting from the point of wanting a button-based launcher-type thing, I'd have used it. But as it was, I was trying to add functionality to something I'd already written, and after making my own head spin for a while, decided against.
For what it's worth, I'd set up a couple of context-sensitive hotkeys but wanted to replicate the functionality of one of them with something a bit more visible. I created a timer loop that checks to see if two specific applications are running and, if the one of them relevant to the hotkey has focus, puts a small (64x64) button onscreen, with alwaysontop set and the notaskbar attribute too so it's not too obtrusive, and if either of the applications closes, the button's destroyed again.
It works well except for the slight timelag caused by the fact that I've put a 2 second delay on it so as not to take too much cpu when there's little happening. That bit I haven't really experimented with much, to be honest, but as long as it doesn't do anything nasty like leak memory, I'm quite happy with the way it works.
Thanks for both your help, anyway: gave me the focus on the thinking I needed to get what I wanted to happen!