Multiple track bars RRS feed

  • Question

  • How do you connect multiple track bars? So when one track bar goes up the other track bar goes down.
    Saturday, February 10, 2018 9:47 PM

All replies

  • Hi,

    I would like to confirm your situation:
    (1) Are you using Windows Forms on which multiple track bars are?
    (2) Are you using C#?

    If this is correct, please refer to my sample:
      both trackBar1 and trackBar2:
          Minimun = 1, Maximum = 100

    private void trackBar1_Scroll(object sender, EventArgs e)
        if (trackBar1.Value < 1 | trackBar1.Value > 99)
            { return; }
            trackBar2.Value = 100 - trackBar1.Value;



    • Edited by Ashidacchi Sunday, February 11, 2018 2:20 AM
    • Proposed as answer by Fei HuModerator Monday, February 12, 2018 2:53 AM
    Sunday, February 11, 2018 2:18 AM
  • Hello Killerbullet,

    Is there any update or any other assistance I could provide? You could mark the helpful reply as answer if the issue has been solved. And if you have any concerns, please do not hesitate to let us know.

    Thanks for your post.

    Best regards,

    Neil Hu

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Tuesday, February 27, 2018 8:17 AM