how to Make the Mouse Freeze c#

前端 未结 6 652
眼角桃花
眼角桃花 2021-01-19 19:33

i want the mouse to freez (cant move) when mouse down thanks

6条回答
  •  借酒劲吻你
    2021-01-19 19:51

    You can fake that behavior for your window in the following way:

    1. Remember current cursor and its position.

    2. Set this.Cursor = Cursors.None;

    3. Draw the remembered cursor at specified position and introduce canExecute flag for all your mouse handlers to disable them during "fake mouse freezing".

提交回复
热议问题