@@ -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
0 commit comments