Ejemplo n.º 1
0
 private void SystemEvents_UserPreferenceChanged(object sender, Microsoft.Win32.UserPreferenceChangedEventArgs e)
 {
     if (CaptureSystemEventForUserPreferenceChanging)
     {
         SystemColor = ThemeInfo.ThemeColor();
         if (e.Category == Microsoft.Win32.UserPreferenceCategory.General)
         {
             //TitlebarPanel.BackColor = SystemColor;
             //CloseICON.BackColor = MaxICON.BackColor = MinICON.BackColor = MenuICON.BackColor = SystemColor;
             SystemColorChanged(SystemColor);
         }
     }
 }
Ejemplo n.º 2
0
        private void InitForm()
        {
            InitializeComponent();
            Size           = new Size(DefaultWidthPercent, DefaultHeightPercent);
            SystemColor    = ThemeInfo.ThemeColor();
            m_aeroEnabled  = false;
            DoubleBuffered = true;
            SetStyle(ControlStyles.ResizeRedraw, true);


            Microsoft.Win32.SystemEvents.UserPreferenceChanged += SystemEvents_UserPreferenceChanged;
            windowPOSX = Left;
            windowPOSY = Top;
        }