The problem is that they say :
"Set it before creating any UI elements to ensure that the correct color mode is used.
... If the system setting is changed, the application will not automatically adapt to the new setting.
"
so application must be re-started.
So it would be better to do like in C++/Win32, by handling WM_SETTINGCHANGE and "ImmersiveColorSet" to get notified when dark/light mode changes and then update colors of controls
Otherwise I quicky tested SystemColorMode in .NET 9 with
Partial Friend Class MyApplication
Private Sub MyApplication_ApplyApplicationDefaults(sender As Object, e As ApplyApplicationDefaultsEventArgs) Handles Me.ApplyApplicationDefaults
e.ColorMode = SystemColorMode.Dark
End Sub
End Class
and for Button style :
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If Application.ColorMode = SystemColorMode.Dark Then
Button1.FlatStyle = FlatStyle.System
'TabPage1.BackColor = SystemColors.ControlDark
'StatusStrip1.BackColor = SystemColors.ControlDark
End If
End Sub