We have a WinForms application which runs on a touch-screen on a bit of industrial equipment. For historical reasons which are not up for changing today, the displayed form has a normal Windows title bar.
We would like to stop people using the mouse (i.e. touchscreen) from moving the window by dragging the title bar. We don't care if there's some other way to move the window using the keyboard.
What's the most elegant way to achieve this? I can think of trying to subvert mouse messages if there's a mouse-down on the titlebar (though NC hit-testing doesn't at first glance seem completely obvious in Winforms), and I can think of responding to Move messages in some way which restores the window position.
But both of these seem clunky, and I have a feeling I am missing something elegant and obvious.