Monday, April 15, 2013

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




Download Link : https://dl.dropboxusercontent.com/u/17858935/Samay-Digital_Clock.zip

2 comments:

  1. Nice post. Got a lot of important stuff from this blog.
    dba kings

    ReplyDelete
    Replies
    1. Thanks a lot.

      I glad that you like the post and thanks for the nice word.

      thanks
      aman

      Delete

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