Skip to content

Commit 4e708c7

Browse files
committed
修复可移动模式下窗口移动到边界无法恢复的Bug - 20231029
1 parent 6c9dee5 commit 4e708c7

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

Assets/SettingUI.png

783 Bytes
Loading

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# TimeControl - 时间小工具
1+
<h1 align="center">
2+
TimeControl - 时间小工具
3+
</h1>
24

35
## 关于本项目
46

Src/TimeControl.suo

-1.5 KB
Binary file not shown.

Src/TimeControl/Form1.vb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,12 +1047,12 @@ Public Class Form1
10471047
If aa = -1 Then
10481048
RegKeyModule.AddReg("Software\CJH\TimeControl\Settings", "TimeFormX", (System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Width - Me.Width) / 2, RegistryValueKind.DWord, "HKCU")
10491049
aa = (System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Width - Me.Width) / 2
1050-
ElseIf aa < -2 - Me.Width Then
1050+
ElseIf aa < 0 - Me.Width Then
10511051
RegKeyModule.AddReg("Software\CJH\TimeControl\Settings", "TimeFormX", (System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Width - Me.Width) / 2, RegistryValueKind.DWord, "HKCU")
1052-
aa = (System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Width - Me.Width) / 2
1053-
ElseIf aa > System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Width + Me.Width + 2 Then
1052+
aa = 0
1053+
ElseIf aa > System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Width Then
10541054
RegKeyModule.AddReg("Software\CJH\TimeControl\Settings", "TimeFormX", (System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Width - Me.Width) / 2, RegistryValueKind.DWord, "HKCU")
1055-
aa = (System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Width - Me.Width) / 2
1055+
aa = System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Width - Me.Width
10561056
Else
10571057
a.X = aa
10581058
End If
@@ -1065,12 +1065,12 @@ Public Class Form1
10651065
If ba = -1 Then
10661066
RegKeyModule.AddReg("Software\CJH\TimeControl\Settings", "TimeFormY", 5, RegistryValueKind.DWord, "HKCU")
10671067
ba = 5
1068-
ElseIf ba < -2 - Me.Height Then
1068+
ElseIf ba < 0 - Me.Height Then
10691069
RegKeyModule.AddReg("Software\CJH\TimeControl\Settings", "TimeFormY", 5, RegistryValueKind.DWord, "HKCU")
10701070
ba = 5
1071-
ElseIf ba > System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Height + Me.Height + 2 Then
1071+
ElseIf ba > System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Height Then
10721072
RegKeyModule.AddReg("Software\CJH\TimeControl\Settings", "TimeFormY", 5, RegistryValueKind.DWord, "HKCU")
1073-
ba = 5
1073+
ba = System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Height - Me.Height
10741074
Else
10751075
a.Y = ba
10761076
End If

Src/TimeControl/My Project/AssemblyInfo.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
3131
' 方法是按如下所示使用“*”:
3232
' <Assembly: AssemblyVersion("1.0.*")>
3333

34-
<Assembly: AssemblyVersion("1.1.19.24102")>
35-
<Assembly: AssemblyFileVersion("1.1.19.24102")>
34+
<Assembly: AssemblyVersion("1.1.20.24103")>
35+
<Assembly: AssemblyFileVersion("1.1.20.24103")>

0 commit comments

Comments
 (0)