We have a WinForms application that runs on a touch screen with a small amount of industrial equipment. For historical reasons that do not change today, the displayed form has the usual Windows title bar.
We would like people using the mouse (i.e. touch screen) not to move the window by dragging the title bar. We don't care if there is another way to move the window using the keyboard.
What is the most elegant way to achieve this? I can think of trying to undermine the mouse messages if the mouse pointer is on the title bar (although NC testing at first glance seems quite obvious in Winforms), and I can think of somehow responding to Move messages restores the position of the window.
But both of these seem awkward, and I feel like I'm missing something elegant and obvious.
source
share