Tag Archives: WndProc

Make a form TopMost or BottomMost in C#

Keeping a form on top of other windows is simple. Just set the form’s TopMost property to true. Keeping a form below other windows is harder. To do that, the program must override its WndProc method, look for messages that … Continue reading

Posted in API, controls, forms | Tagged , , , , , , , , , , , , , , , , , | 1 Comment

Remove a TextBox control’s context menu in C#

Normally a TextBox control has a context menu that appears when you right-click it, but what if you don’t want that context menu? I mean, really. Am I required to have “Show Unicode control characters” and “Open IME” on every … Continue reading

Posted in controls | Tagged , , , , , , , , , , | 1 Comment

Use WndProc to read Windows messages in C#

This example shows how you can determine what windows messages a program is receiving. (In earlier versions of Visual Basic, you could intercept messages by using API functions to install a WndProc handler. That was called “subclassing” so the method … Continue reading

Posted in forms, system | Tagged , , , , , , , , , , , | Leave a comment