2012r2 visual style button click

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 6 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
dan.potter
Posts: 709
Last visit: Wed Nov 14, 2018 11:39 am

2012r2 visual style button click

Post by dan.potter »

Anyone know how to make animated buttons in 2012? I've tried changing the visual effects for the os and each flat style appearance option for the button but it still does not indicate when the button is pressed.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: 2012r2 visual style button click

Post by jvierra »

What makes you think this doesn't work in 2012?

Without code it is impossible to know how things got set this way.

Create a simple form. Drop a button. Set style = "Flat". Test. It works as expected but can be hard to detect with some desktop themes. Change "FlatAppearance" to set colors that are more obvious. "RollOver" may not be visible with some themes.

This is not considered "animation".
User avatar
dan.potter
Posts: 709
Last visit: Wed Nov 14, 2018 11:39 am

Re: 2012r2 visual style button click

Post by dan.potter »

Code isn't really necessary. On my desktop or a 2008 server I can see a very slight blink of the button when it's pressed. That doesn't seem to happen on my 2012 server. Flat seems to work better although it's difficult to find the exact system colors for the mousehover and border. Not my favorite bandaid, but I ended up just changing the cursor to a waitcursor for 100ms and changing it back to default :)
This topic is 6 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked