Try this...
private const int HWND_BROADCAST = 0xffff;
private const int WM_WININICHANGE = 0x001a, WM_SETTINGCHANGE = WM_WININICHANGE, INI_INTL = 1;
SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0, INI_INTL);
[DllImport("user32.dll")]
private static extern int SendMessage(int hWnd, uint wMsg, uint wParam, uint lParam);
This will notify all applications that changes have been made to the registry, and those programs that accept the notification shuould reload their settings.
Note that not all applications may do this, but things like control panel should.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…