Chris Mitchell has written an interesting article in MSDN Magazine on automatically adjusting the ring volume on Pocket PC phone devices. Built on C# and compact framework.