Skip to content

Commit af1d1e3

Browse files
committed
修复了全屏功能的一些问题 - 20241124
1 parent a003aa5 commit af1d1e3

File tree

5 files changed

+127
-114
lines changed

5 files changed

+127
-114
lines changed

Src/TimeControl.suo

512 Bytes
Binary file not shown.

Src/TimeControl/Form1.vb

Lines changed: 61 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -136,24 +136,26 @@ Public Class Form1
136136
'End If
137137
Me.Height = MeH + disi.DpiY * 0.01 * 12
138138
Me.Width = MeW + disi.DpiX * 0.01 * 12
139-
If TimeTheme = 0 Then
140-
If Me.Width >= 250 Then
141-
If crmd = 0 Then
142-
Me.BackgroundImage = My.Resources.bkgdark400
143-
Else
144-
Me.BackgroundImage = My.Resources.bkg400
145-
End If
146-
ElseIf Me.Width <= 70 Then
147-
If crmd = 0 Then
148-
Me.BackgroundImage = My.Resources.bkgdark50
149-
Else
150-
Me.BackgroundImage = My.Resources.bkg50
151-
End If
152-
Else
153-
If crmd = 0 Then
154-
Me.BackgroundImage = My.Resources.bkgdark
139+
If Me.WindowState = FormWindowState.Normal Then
140+
If TimeTheme = 0 Then
141+
If Me.Width >= 250 Then
142+
If crmd = 0 Then
143+
Me.BackgroundImage = My.Resources.bkgdark400
144+
Else
145+
Me.BackgroundImage = My.Resources.bkg400
146+
End If
147+
ElseIf Me.Width <= 70 Then
148+
If crmd = 0 Then
149+
Me.BackgroundImage = My.Resources.bkgdark50
150+
Else
151+
Me.BackgroundImage = My.Resources.bkg50
152+
End If
155153
Else
156-
Me.BackgroundImage = My.Resources.bkg
154+
If crmd = 0 Then
155+
Me.BackgroundImage = My.Resources.bkgdark
156+
Else
157+
Me.BackgroundImage = My.Resources.bkg
158+
End If
157159
End If
158160
End If
159161
End If
@@ -1283,28 +1285,31 @@ Public Class Form1
12831285
End Sub
12841286
Sub formatcolorcur()
12851287
If crmd = 0 Then
1286-
If TimeTheme = 0 Then
1287-
If Me.Width >= 250 Then
1288-
Me.BackgroundImage = My.Resources.bkgdark400
1289-
ElseIf Me.Width <= 70 Then
1290-
Me.BackgroundImage = My.Resources.bkgdark50
1288+
If Me.WindowState = FormWindowState.Normal Then
1289+
If TimeTheme = 0 Then
1290+
If Me.Width >= 250 Then
1291+
Me.BackgroundImage = My.Resources.bkgdark400
1292+
ElseIf Me.Width <= 70 Then
1293+
Me.BackgroundImage = My.Resources.bkgdark50
1294+
Else
1295+
Me.BackgroundImage = My.Resources.bkgdark
1296+
End If
1297+
Me.TransparencyKey = Color.FromArgb(1, 1, 1)
1298+
Opacity = 0.99
1299+
ElseIf TimeTheme = 1 Then
1300+
Me.BackgroundImage = Nothing
1301+
Me.TransparencyKey = Color.FromArgb(255, 0, 255)
1302+
Opacity = 0.7
1303+
ElseIf TimeTheme = 3 Then
1304+
Me.BackgroundImage = Nothing
1305+
Me.TransparencyKey = Color.FromArgb(255, 0, 255)
1306+
Opacity = CustOpacity * 0.01
12911307
Else
1292-
Me.BackgroundImage = My.Resources.bkgdark
1308+
Opacity = CustOpacity * 0.01
12931309
End If
1294-
Me.TransparencyKey = Color.FromArgb(1, 1, 1)
1295-
Opacity = 0.99
1296-
ElseIf TimeTheme = 1 Then
1297-
Me.BackgroundImage = Nothing
1298-
Me.TransparencyKey = Color.FromArgb(255, 0, 255)
1299-
Opacity = 0.7
1300-
ElseIf TimeTheme = 3 Then
1301-
Me.BackgroundImage = Nothing
1302-
Me.TransparencyKey = Color.FromArgb(255, 0, 255)
1303-
Opacity = CustOpacity * 0.01
1304-
Else
1305-
Opacity = CustOpacity * 0.01
1310+
13061311
End If
1307-
1312+
13081313
If Label1.ForeColor.R = 0 And Label1.ForeColor.G = 0 And Label1.ForeColor.B = 0 Then
13091314
Me.Label1.ForeColor = Color.White
13101315
If UnSaveData = 0 Then
@@ -1331,28 +1336,29 @@ Public Class Form1
13311336
EnableDarkModeForWindow(Me.Handle, True)
13321337

13331338
Else
1334-
If TimeTheme = 0 Then
1335-
If Me.Width >= 250 Then
1336-
Me.BackgroundImage = My.Resources.bkg400
1337-
ElseIf Me.Width <= 70 Then
1338-
Me.BackgroundImage = My.Resources.bkg50
1339+
If Me.WindowState = FormWindowState.Normal Then
1340+
If TimeTheme = 0 Then
1341+
If Me.Width >= 250 Then
1342+
Me.BackgroundImage = My.Resources.bkg400
1343+
ElseIf Me.Width <= 70 Then
1344+
Me.BackgroundImage = My.Resources.bkg50
1345+
Else
1346+
Me.BackgroundImage = My.Resources.bkg
1347+
End If
1348+
Me.TransparencyKey = Color.FromArgb(184, 184, 184)
1349+
Opacity = 0.99
1350+
ElseIf TimeTheme = 1 Then
1351+
Me.BackgroundImage = Nothing
1352+
Me.TransparencyKey = Color.FromArgb(255, 0, 255)
1353+
Opacity = 0.7
1354+
ElseIf TimeTheme = 3 Then
1355+
Me.BackgroundImage = Nothing
1356+
Me.TransparencyKey = Color.FromArgb(255, 0, 255)
1357+
Opacity = CustOpacity * 0.01
13391358
Else
1340-
Me.BackgroundImage = My.Resources.bkg
1359+
Opacity = CustOpacity * 0.01
13411360
End If
1342-
Me.TransparencyKey = Color.FromArgb(184, 184, 184)
1343-
Opacity = 0.99
1344-
ElseIf TimeTheme = 1 Then
1345-
Me.BackgroundImage = Nothing
1346-
Me.TransparencyKey = Color.FromArgb(255, 0, 255)
1347-
Opacity = 0.7
1348-
ElseIf TimeTheme = 3 Then
1349-
Me.BackgroundImage = Nothing
1350-
Me.TransparencyKey = Color.FromArgb(255, 0, 255)
1351-
Opacity = CustOpacity * 0.01
1352-
Else
1353-
Opacity = CustOpacity * 0.01
13541361
End If
1355-
13561362
Me.BackColor = Color.White
13571363
Me.ForeColor = Color.Black
13581364
If Label1.ForeColor.R = 255 And Label1.ForeColor.G = 255 And Label1.ForeColor.B = 255 Then

Src/TimeControl/Form2.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
<data name="PictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
128128
<value>
129129
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1
130-
MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsEAAA7BAbiRa+0AAAB7SURBVDhPxZHRCYAwDAU7jiM4
130+
MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsAAAA7AAWrWiQkAAAB7SURBVDhPxZHRCYAwDAU7jiM4
131131
mFO4kXM4UPQhD8xL0ip+WDiwIXcUbGYWmJbNMnQPhAEW53VPySJO7MmEe2lAl3l0HgKVnH0TRoZyNXsV
132132
0DuBmwaUT4FKBv8G4J2n/o0jXKAXwdEZZeACT17CvRAgVUhF4i53KFTihbUD0860AyUhweoAAAAASUVO
133133
RK5CYII=
@@ -139,7 +139,7 @@
139139
<data name="PictureBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
140140
<value>
141141
iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1
142-
MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxAAAAsQAa0jvXUAAAzwSURBVHhe1ZvZdhXVFobzCL6B
142+
MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACw8AAAsPAZL5A6UAAAzwSURBVHhe1ZvZdhXVFobzCL6B
143143
vMnhDQ5vcHLlpeFOuUruvIQ77DAqYIcYbLAZQ40iDFCUOGyGDcIWxF6zsW9ZdeY3mf9y1tq1Q5CAWGN8
144144
Y85VCcn+5lxVtapSzFztbWlpaZMx+8QTT2w3lh5//PEVY2R0RonYHThwYGSsGPbtSwv2vf/l38aP+Xdt
145145
9uH/gzCiFl1QMUDcMeE6JgcTr9h4ZHHR2Bw//vrc7APe8OSTT86byNhka2czEsy5CNmaNxTiY489Ntq/

Src/TimeControl/Form2.vb

Lines changed: 62 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,7 @@ errcode:
10651065
RegKeyModule.DelReg("Software\CJH\TimeControl\Settings", "CustomHeight", "HKCU")
10661066
RegKeyModule.DelReg("Software\CJH\TimeControl\Settings", "CustomWidth", "HKCU")
10671067

1068-
1068+
Form1.WindowState = FormWindowState.Normal
10691069

10701070
Form1.Label1.Font = New System.Drawing.Font("Segoe UI", 21.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
10711071
Me.FontDialog1.Font = Form1.Label1.Font
@@ -1355,29 +1355,31 @@ errcode:
13551355
RegKeyModule.AddReg("Software\CJH\TimeControl\Settings", "CustomWidth", Form1.Width, RegistryValueKind.DWord, "HKCU")
13561356
End If
13571357

1358-
1359-
If Form1.TimeTheme = 0 Then
1360-
If Form1.Width >= 250 Then
1361-
If Form1.crmd = 0 Then
1362-
Form1.BackgroundImage = My.Resources.bkgdark400
1363-
Else
1364-
Form1.BackgroundImage = My.Resources.bkg400
1365-
End If
1366-
ElseIf Form1.Width <= 70 Then
1367-
If Form1.crmd = 0 Then
1368-
Form1.BackgroundImage = My.Resources.bkgdark50
1369-
Else
1370-
Form1.BackgroundImage = My.Resources.bkg50
1371-
End If
1372-
Else
1373-
If Form1.crmd = 0 Then
1374-
Form1.BackgroundImage = My.Resources.bkgdark
1358+
If Form1.WindowState = FormWindowState.Normal Then
1359+
If Form1.TimeTheme = 0 Then
1360+
If Form1.Width >= 250 Then
1361+
If Form1.crmd = 0 Then
1362+
Form1.BackgroundImage = My.Resources.bkgdark400
1363+
Else
1364+
Form1.BackgroundImage = My.Resources.bkg400
1365+
End If
1366+
ElseIf Form1.Width <= 70 Then
1367+
If Form1.crmd = 0 Then
1368+
Form1.BackgroundImage = My.Resources.bkgdark50
1369+
Else
1370+
Form1.BackgroundImage = My.Resources.bkg50
1371+
End If
13751372
Else
1376-
Form1.BackgroundImage = My.Resources.bkg
1373+
If Form1.crmd = 0 Then
1374+
Form1.BackgroundImage = My.Resources.bkgdark
1375+
Else
1376+
Form1.BackgroundImage = My.Resources.bkg
1377+
End If
13771378
End If
13781379
End If
13791380
End If
13801381

1382+
13811383
If Not (Form1.SaveLoc = 1 And Form1.IsBootV = 1) Then
13821384
If c <> 0 Then
13831385
Form1.Location = New Point(Form1.Location.X + c / 2, Form1.Location.Y)
@@ -1480,30 +1482,33 @@ errcode:
14801482
Private Sub Button11_Click(sender As System.Object, e As System.EventArgs) Handles Button11.Click
14811483
If MessageBox.Show("确定要清除自定义背景吗?" & vbCrLf & "这将恢复背景到默认圆角主题。", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
14821484
TextBox5.Text = ""
1483-
If Form1.Width >= 250 Then
1484-
If Form1.crmd = 0 Then
1485-
Form1.BackgroundImage = My.Resources.bkgdark400
1486-
Else
1487-
Form1.BackgroundImage = My.Resources.bkg400
1488-
End If
1489-
ElseIf Form1.Width <= 70 Then
1490-
If Form1.crmd = 0 Then
1491-
Form1.BackgroundImage = My.Resources.bkgdark50
1485+
If Form1.WindowState = FormWindowState.Normal Then
1486+
If Form1.Width >= 250 Then
1487+
If Form1.crmd = 0 Then
1488+
Form1.BackgroundImage = My.Resources.bkgdark400
1489+
Else
1490+
Form1.BackgroundImage = My.Resources.bkg400
1491+
End If
1492+
ElseIf Form1.Width <= 70 Then
1493+
If Form1.crmd = 0 Then
1494+
Form1.BackgroundImage = My.Resources.bkgdark50
1495+
Else
1496+
Form1.BackgroundImage = My.Resources.bkg50
1497+
End If
14921498
Else
1493-
Form1.BackgroundImage = My.Resources.bkg50
1499+
If Form1.crmd = 0 Then
1500+
Form1.BackgroundImage = My.Resources.bkgdark
1501+
Else
1502+
Form1.BackgroundImage = My.Resources.bkg
1503+
End If
14941504
End If
1495-
Else
14961505
If Form1.crmd = 0 Then
1497-
Form1.BackgroundImage = My.Resources.bkgdark
1506+
Form1.TransparencyKey = Color.FromArgb(1, 1, 1)
14981507
Else
1499-
Form1.BackgroundImage = My.Resources.bkg
1508+
Form1.TransparencyKey = Color.FromArgb(184, 184, 184)
15001509
End If
15011510
End If
1502-
If Form1.crmd = 0 Then
1503-
Form1.TransparencyKey = Color.FromArgb(1, 1, 1)
1504-
Else
1505-
Form1.TransparencyKey = Color.FromArgb(184, 184, 184)
1506-
End If
1511+
15071512

15081513
OpenFileDialog1.FileName = ""
15091514
If Form1.UnSaveData = 0 Then
@@ -1528,28 +1533,30 @@ errcode:
15281533
MsgBox("加载自定义背景图片失败。已恢复默认图片。" & vbCrLf & ex.Message, MsgBoxStyle.Critical, "错误")
15291534
OpenFileDialog1.FileName = ""
15301535
TextBox5.Text = ""
1531-
If Form1.crmd = 0 Then
1532-
Form1.TransparencyKey = Color.FromArgb(1, 1, 1)
1533-
Else
1534-
Form1.TransparencyKey = Color.FromArgb(184, 184, 184)
1535-
End If
1536-
If Form1.Width >= 250 Then
1537-
If Form1.crmd = 0 Then
1538-
Form1.BackgroundImage = My.Resources.bkgdark400
1539-
Else
1540-
Form1.BackgroundImage = My.Resources.bkg400
1541-
End If
1542-
ElseIf Form1.Width <= 70 Then
1536+
If Form1.WindowState = FormWindowState.Normal Then
15431537
If Form1.crmd = 0 Then
1544-
Form1.BackgroundImage = My.Resources.bkgdark50
1538+
Form1.TransparencyKey = Color.FromArgb(1, 1, 1)
15451539
Else
1546-
Form1.BackgroundImage = My.Resources.bkg50
1540+
Form1.TransparencyKey = Color.FromArgb(184, 184, 184)
15471541
End If
1548-
Else
1549-
If Form1.crmd = 0 Then
1550-
Form1.BackgroundImage = My.Resources.bkgdark
1542+
If Form1.Width >= 250 Then
1543+
If Form1.crmd = 0 Then
1544+
Form1.BackgroundImage = My.Resources.bkgdark400
1545+
Else
1546+
Form1.BackgroundImage = My.Resources.bkg400
1547+
End If
1548+
ElseIf Form1.Width <= 70 Then
1549+
If Form1.crmd = 0 Then
1550+
Form1.BackgroundImage = My.Resources.bkgdark50
1551+
Else
1552+
Form1.BackgroundImage = My.Resources.bkg50
1553+
End If
15511554
Else
1552-
Form1.BackgroundImage = My.Resources.bkg
1555+
If Form1.crmd = 0 Then
1556+
Form1.BackgroundImage = My.Resources.bkgdark
1557+
Else
1558+
Form1.BackgroundImage = My.Resources.bkg
1559+
End If
15531560
End If
15541561
End If
15551562
If Form1.UnSaveData = 0 Then

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.21.24111")>
35-
<Assembly: AssemblyFileVersion("1.1.21.24111")>
34+
<Assembly: AssemblyVersion("1.1.22.24112")>
35+
<Assembly: AssemblyFileVersion("1.1.22.24112")>

0 commit comments

Comments
 (0)