Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

How to get form in focus and trigger button.click event in the same click?

$
0
0

Hi,

this should be easy but I can't figure it out...

So, when my form is not in focus and I click some button, I have to click twice because with first click on the button I got form in focus and then with second click the button.click event is triggered.

When i try this with the standard forms (e.g. 'My computer' form) in windows OS then even when the form is not in focus the first click on some button gets that form in focus and triggers the button.click event. How is that accomplished?






Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>