4
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by yousafc#
1

To programmatically press a button in C#, use the PerformClick() method on each button.

b1.PerformClick()
b2.PerformClick()
b3.PerformClick()
b4.PerformClick()
b5.PerformClick()

Edited by Mouche: n/a

1

How does this look.

var buttons = new[] { button1, button2, button3, button4, button5 };
Array.ForEach(buttons, b => b.PerformClick());
0

What you you select all (one by one, but all eventually)? Isnt this a bid odd?

Or did you mean something else?

0

thanks nick.crane ,You solved the problem .


and Thanks for Lamouche and Mitja Bonca

Edited by yousafc#: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.