PowerShell

Samay : Powershell script based digital clock.

Hi,

Few days back i was writing an powershell GUI based script, in that script I need to add a clock.

First i thought how can i make a clock? I was thinking about an hour and then i got an idea. why not to use timer object and use it for creating an clock.

This is what i have done to create a GUI clock.

  1. Created a blank form on “Powershell Studio”
  2. Add a blank label to it
    1. 15-04-2013 23-12-48
  3. Added a time object to it.
    1. 15-04-2013 23-13-18
  4. In timer object property , i set Enabled to true, and interval to 1 {which is very low because the it is in milliseconds}
  5. Double click on “Timer” object and i added the below code.
  6. 15-04-2013 23-11-16
  7. In above code , i am just converting, Get-Date to string.
  8. and when you run scrip the outcome is running Powershell Digital clock.

Screenshot

15-04-2013 23-03-59

You can download the script from here : http://gallery.technet.microsoft.com/scriptcenter/Samay-Powershell-Digital-45acb9d2

Thanks
Aman Dhally
clip_image001 clip_image002 clip_image003 clip_image005clip_image007