// Allow for dragging around of the form.
 private void MainFormSmall_MouseMove(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         WinAPIComponents.ReleaseCapture();
         WinAPIComponents.SendMessage(Handle, WinAPIComponents.WM_NCLBUTTONDOWN, WinAPIComponents.HT_CAPTION, 0);
         this.Invalidate();
     }
 }
 private void ThemeMDIClients()
 {
     foreach (MdiClient Control in this.Controls.OfType <MdiClient>())
     {
         // Set the BackColor of the MdiClient control.
         Control.BackColor  = this.BackColor;
         Control.MouseMove += MainFormSmall_MouseMove;
         WinAPIComponents.SetBevel(this, false);
     }
 }
        public void InitializeSystem()
        {
            SplashLoader.xSetPercentage(10);
            SplashLoader.xSetMessage("Loading 1/6...");

            Program.xSmallMainWindow = this;
            SplashLoader.xSetPercentage(15);
            Toolstrip_Bottom.Renderer = new MyToolStrip();                                                                            // Do not draw an outline on toolstrips!
            SplashLoader.xSetPercentage(20);
            this.Region = System.Drawing.Region.FromHrgn(WinAPIComponents.CreateRoundRectRgn(0, 0, this.Width, this.Height, 30, 30)); // Rounded edges!

            SplashLoader.xSetPercentage(30);
            SplashLoader.xSetMessage("Loading 2/6...");

            Program.xFonts.SetupMainWindow(this);            // Call SetupFonts in xFonts object.
            ButtonColour = Color.FromArgb(232, 234, 246);    // Set the button default colour to the background colour of the light control buttons.

            SplashLoader.xSetPercentage(40);
            SplashLoader.xSetMessage("Loading 3/6...");

            /// Set local theme overrides!
            RedirectThemeValues();                           // Must preceede following.
            ThemeMethods.DoThemeAssets(this);                // Automatically theme assets!

            SplashLoader.xSetPercentage(50);
            SplashLoader.xSetMessage("Loading 4/6...");

            SetupSwappableScreens();             // If using Swappable forms!
            ThemeMethods.AutoLoadCurrentTheme(); // Automatically theme the world!

            //ShowWelcomeScreen(); // Show the welcome screen!
            ShowOptionsMenu();                                                                // Show the default options menu.

            DirectInputDevicesHook.PlayerControllers = DirectInputDevicesHook.GetJoySticks(); // Setup Gamepads!
            DirectInputDevicesHook.SetupGamePadTick();                                        // Setup Gamepad Ticks!

            SplashLoader.xSetPercentage(70);
            SplashLoader.xSetMessage("Loading 5/6...");
            LoadHeroesSettings();

            SplashLoader.xSetMessage("Loading 6/6...");
            SplashLoader.xSetPercentage(100);
            SplashLoader.UpdateStatusCircleComplete = true;
        }