I recommend if you want to learn how to do that kind of stuff to go to MSDN and/or somewhere that you can find out about the Win32 API's, Im guessing that is how you would go about doing what you want to do.
http://www.winprog.org/tutorial/
here is a basic win32 api tutorial