C# Form Move Stopped Event

后端 未结 5 1378
深忆病人
深忆病人 2020-12-19 13:53

Is there any event in C# that fires when the form STOPS being moved. Not while its moving.

If there is no event for it, is there a way of doing it with WndProc?

5条回答
  •  庸人自扰
    2020-12-19 14:16

    Just set a flag to true when onmove events are fired. If a mouseup event happens and the flag is true, the form stopped being moved.

    I admit this probably won't work in the case of a user moving a form via the keyboard, but that's pretty rare.

提交回复
热议问题