I'm trying to get my items in my domainUpDown control to spin for a few seconds rather than just increment/decrement one item at a time and then stop randomly on any item, but not sure how to go about it. I have the Wrap property set to True so the items will loop. I'm pretty sure I'll need a timer and randomly set how long each time it will spin for. Any ideas?
roachae
0
Junior Poster in Training
Recommended Answers
Jump to PostUse Invoke method of domainUpDown control.
private void Form1_Load(object sender, EventArgs e) { domainUpDown1.Items.AddRange(new string[] { "A", "B", "C", "D", "E", "F", "G", "H" }); } private void button1_Click_1(object sender, EventArgs e) { domainUpDown1.Invoke(new Action(() => { Random r = new Random(); int n = r.Next(0, domainUpDown1.Items.Count); …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.