Button’s ‘MouseHover’ events.
In my previous post, I had shown how to use the “click” event of the Button element.
Today are going to use the “MouseHover” events of the button.
Mouse Hover
The mouse hover event trigger when we hover the mouse over the button.
To create a “MouseHover” event in the “PowerShell Studio 2012” please do the following.
1. Open your GUI form.
2. Open your GUI project file.
3. Click on “Button” and then go to properties pane of the “button” element.
4. Click on the “Lightening” ICON and double click on the “MouseHobver”.
6. You will see that “PowerShell Studio” has created a function code for it.
8. Now the question is what we want to do when we hover the mouse over the button?
9. What about changing the colour of the button?
10. Lets’ change the colour the the button to blue when we move the mouse over it
11.
12. $button1.BackColor = 'Blue'
13.
15. Press “Ctrl + 5” and try it
17. Now let’s hove the mouse over it
19. And here you see J the button is turned in to the Blue.
That’s all for now. See you in my next blog posts.
Regards
Aman Dhally
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.