Thursday, February 20, 2014

Powershell and GUI : Button element’s Mouse Hover events.

 

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”.

5.       clip_image002

6.         You will see that “PowerShell Studio” has created a function code for it.

7.       clip_image003

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.    

14.   clip_image004

15.   Press “Ctrl + 5” and try it

16.   clip_image005

17.   Now let’s hove the mouse over it

18.   clip_image006

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

clip_image017 clip_image018 clip_image019 clip_image020  clip_image021

 

 

 

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.