1

I've seen here: How to make a button appear as if it is pressed? how to make a button in a winforms application look pressed (and that it stays pressed) in 2008.

In my application I travel a similar route there but what I'm trying to do is to get more a feel like a mouse has clicked the button. Thus it becomes pressed for a second and then unpressed again (just like with a regular mouse click).

What I'm wondering there is if in 2017+ that Checkbox Workaround is still the best Approach even for this route (and it Needs to be "checked" and "unchecked") or if there is a better approach there (thus also one possible with the button itself)?

Thomas
  • 2,886
  • 3
  • 34
  • 78
  • You answering your own question. [Simulate mouse click?](https://stackoverflow.com/questions/2416748/how-to-simulate-mouse-click-in-c) – Renatas M. Aug 08 '17 at 09:10
  • @reniuz wow oO that means I either have to use the Checkbox Approach or create a "mouse Simulator"? I sincerly had hoped that there was a more easy (and handily) approach than something like that oO. If that is the only way then I dare say my question could be seen as a duplicate there to that question (as the answer will be the same there). Like mentioned I hope there is a different possible way, but if then ouch (then the Checkbox is the most easy Approach as hurtful as it is). – Thomas Aug 08 '17 at 09:14
  • You can use the checkbox approach and set checked == true, or false in your code. – Michael Beuving Aug 08 '17 at 09:16
  • @MichaelTralala yepp and I would Need to put a delay in between the two. Still I had hoped that tehre is a better Approach possible there (but as mentioned that will then the way be if I have to decide between the implementation of the mouse Simulator and the Checkbox (if no other way exists for Buttons themselves). – Thomas Aug 08 '17 at 09:18
  • What is the "easy and handily way"? 6 lines of code and extension method is super easy and handy for me. – Renatas M. Aug 08 '17 at 09:45

0 Answers0