Look at Francesco`s article regrding this
http://www.dotnet2themax.com/ShowCon...0-c2bb7075ba78
the attom thingy well he tells it here :
"you need to install the hotkey, which you do by calling the RegisterHotKey
API function: this function takes a unique id, and MSDN docs explain that you
should call GlobalAddAtom to get such an id. Besides, you must store this id
in a form variable, because you need it later, to unregister the class and
delete the global atom you created"
so someone using the RegisterHotKey API function without the use of a
doesn`t follow the MSDN rule for getting the unique id or doesn`t care about
a good cleanup routine ( or isn`t aware that he should call GlobalAddAtom to
get such an id )
regards
Michel Posseth [MCP]
"Water Cooler v2" wrote:
Thanks! That is a nice tip I will surely use in the future. For now,
I'll be using the Win32 API to register the hotkey that is system-wide
because this menu-item solution, I believe:
1. Will not be system-wide; and
2. Will not be able to restore the form once minimized.
But a great tip I never thought of, really. Thanks a lot.
Another related question:
I've seen examples that use RegisterHotKey API without a global atom
and some that do add a global atom for the key in the Global Atom
database. Would someone tell me whether it is absolutely necessary to
have a global atom for the hotkey? If not, what is the difference
between the two approaches.