In a derived class you should override WndProc as follows (listening to the WM_KEYUP message, for example):