private void Form1_TextChanged(object sender, EventArgs e) { iCount = 0; a = 0; this.Opacity = 100; this.Visible = true; this.BringToFront(); if (this.Text != null) { SetBrightness(bLevels[Convert.ToInt32(this.Text)]); } check_brightness(); //make labels visible label1.Visible = true; label2.Visible = true; //enter it's value label1.Text = GetBrightness().ToString(); //define size label2.Height = label1.Height + 4; label2.Width = label1.Width + 4; //define it's position label1.Left = Trackbar1.Left - 60; label1.Top = Trackbar1.Top + Trackbar1.thumbY;//(((100 - Convert.ToInt32(label1.Text)) * Trackbar1.Height) / 100); label2.Left = label1.Left - 2; label2.Top = label1.Top - 2; //recolor if necessary Color now = StartMenu.getSecondary(); now = ControlPaint.Light(now, 25); Trackbar1.Progresscolor = StartMenu.getSecondary(); Trackbar1.ProgresscolorPressed = now; Trackbar1.Trackercolor = SystemColors.ControlDarkDark; Trackbar1.TrackercolorPressed = SystemColors.ControlDark; }
private void trackBar1_MouseMove(object sender, MouseEventArgs e) { Color now = StartMenu.getSecondary(); now = ControlPaint.Light(now, 25); trackBar1.BackgroundBrush = new SolidBrush(SystemColors.ControlDark); trackBar1.ProgressBackgroundBrush = new SolidBrush(now); }
private void trackBar1_MouseLeave(object sender, EventArgs e) { trackBar1.BackgroundBrush = new SolidBrush(SystemColors.ControlDarkDark); trackBar1.ProgressBackgroundBrush = new SolidBrush(StartMenu.getSecondary()); }