O'Reilly logo

Extreme Programming Adventures in C# by Ron Jeffries

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. Discovering the Menu

Our addition of the "section" feature worked fine, except for an irritating beep every time we insert a section. A bit of learning suggests that this is a menu-related problem, even though we don’t have a menu—yet.

Exploring the Problem

As soon as we added the new section logic to the GUI, using Alt+S, and began using the software through the GUI, Chet and I discovered an irritating beep every time we typed the Alt+S. We tried to be sure that we were properly telling Microsoft Windows that we had consumed the character, but that didn’t suppress the beep. So we did a little experimenting: we added a couple of Console.WriteLine sends to the KeyPress and KeyDown handlers, to print out what was happening and when. In ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required