Merge pull request #5792 from Open-KFC/fix5655

Fix:鼠标保持移动时抬起仍可继续改变窗口大小
This commit is contained in:
龙腾猫跃
2025-04-25 19:01:57 +08:00
committed by GitHub
+2 -1
View File
@@ -301,7 +301,7 @@ Public Class MyResizer
End Sub End Sub
Private Sub updateMouseDown() Private Sub updateMouseDown()
Dim flag As Boolean = Mouse.LeftButton = MouseButtonState.Released Dim flag = (GetAsyncKeyState(&H1) And &H8000) = 0 '调用原生API判断鼠标是否抬起,如果使用WPF的API的话鼠标不在窗口上时不会更新状态 (#5655)
If flag Then If flag Then
resizeRight = False resizeRight = False
resizeLeft = False resizeLeft = False
@@ -312,4 +312,5 @@ Public Class MyResizer
Private Declare Function GetCursorPos Lib "user32.dll" (<Out()> ByRef lpPoint As PointAPI) As Boolean Private Declare Function GetCursorPos Lib "user32.dll" (<Out()> ByRef lpPoint As PointAPI) As Boolean
Private Declare Function GetAsyncKeyState Lib "user32.dll" (vKey As Integer) As Short
End Class End Class