private void RexWidget_MouseMove(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.None) { mActiveControl = GetActiveControl(e.Location); } }
/// <summary> /// Draws all switches of the parallel port. /// </summary> /// <param name="g"></param> private void DrawSwitches(Graphics g) { for (int i = 0; i < mSwitchLoc.Length; i++) { ControlWithFocus controlToTest = (ControlWithFocus)((int)(ControlWithFocus.Switch0) << i); Brush b = (mActiveControl == controlToTest) ? Brushes.LightGray : Brushes.White; DrawSwitch(g, mSwitchLoc[i], b, i); } }
private void RexWidget_MouseMove(object sender, MouseEventArgs e) { mActiveControl = GetActiveControl(e.Location); }