Results 1 to 14 of 14

Thread: Alarm Clock

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2005
    Posts
    300

    Alarm Clock

    How easy would it be to make an alarm clock.

    I just want it to go of at about 10 different times a day. To remind me to join poker tournements.
    I would want it to be minimized to system tray and then just make some random noise when it gets to the time i want it to go of at.

    Is this advanced or quite simple ?
    Im Learning !!!!

  2. #2
    Fanatic Member
    Join Date
    Aug 2005
    Location
    South Africa
    Posts
    760

    Re: Alarm Clock

    Sounds quite easy, but you could get this easily from http://www.pscode.com/vb
    If I helped you out, please consider adding to my reputation!

    -- "The faulty interface lies between the chair and the keyboard" --

    VB6 Programs By Me:
    ** Dictionary, Thesaurus & Rhyme-Generator In One ** WMP Recent Files List Editor ** Pretty Impressive Clock ** Extract Firefox History **

  3. #3
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Alarm Clock

    Ricky1,

    You could just create a task in Task Scheduler to run a program that just displays a message or just execute the send message command to yourself. No real programming required.

  4. #4
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: Alarm Clock

    Quote Originally Posted by randem
    Ricky1,

    You could just create a task in Task Scheduler to run a program that just displays a message or just execute the send message command to yourself. No real programming required.
    ummmmmmm, how can i add a task in the Task Scheduler?? just by making the first form invisible??
    Show Appreciation. Rate Posts.

  5. #5
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Alarm Clock

    Harsh Gupta,

    What????

  6. #6
    Fanatic Member dark_shadow's Avatar
    Join Date
    Feb 2005
    Location
    Igloo
    Posts
    900

    Re: Alarm Clock

    task scheduler is a program built into windows i believe

  7. #7
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Alarm Clock

    Yes,

    Start->Settings->Control Panel->Task Scheduler

    or

    Start->Control Panel->Task Scheduler

  8. #8
    Fanatic Member dark_shadow's Avatar
    Join Date
    Feb 2005
    Location
    Igloo
    Posts
    900

    Re: Alarm Clock

    if you insist on doing it in code form then try this

    VB Code:
    1. Dim showTime As Boolean
    2. Dim MyHour As Integer
    3. Dim MyMinute As Integer
    4. Dim MySecond As Integer
    5. Dim CurrHour As Integer
    6. Dim CurrMinute As Integer
    7. Dim CurrSecond As Integer
    8.  
    9. Private Sub DisplayTime()
    10.     do while showtime = false
    11.     lbl1.Caption = Time
    12.     DoEvents
    13.     Check_Time
    14. Loop
    15. End Sub
    16.  
    17.  
    18. Private Sub Check_Time()
    19.     ' Set hour, minute and seconds for alarm
    20.     MyHour = ' the hour u want somthing to happen at
    21.     MyMinute = 'the min u want somthing to happen at
    22.     MySecond = 'the second u want somthing to happen at
    23.    
    24.     CurrHour = Hour(Time)
    25.     CurrMinute = Minute(Time)
    26.     CurrSecond = Second(Time)
    27.    
    28.     If (CurrHour = MyHour) And (CurrMinute = MyMinute) And (CurrSecond = MySecond) Then
    29.         MsgBox "times up!!!"
    30.     End If

  9. #9
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Alarm Clock

    You can also program the Task Scheduler by using the AT command from the command prompt, or by using SHELL programmatically. Use AT /? to find the parameters involved.

  10. #10
    Fanatic Member dark_shadow's Avatar
    Join Date
    Feb 2005
    Location
    Igloo
    Posts
    900

    Re: Alarm Clock

    dglienna's way is probally easier than doing it code way but i assumed u wanted code that's why its on the classic vb forum

  11. #11
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Alarm Clock

    You can shell the 'at' command from vb

  12. #12
    Fanatic Member dark_shadow's Avatar
    Join Date
    Feb 2005
    Location
    Igloo
    Posts
    900

    Re: Alarm Clock

    really ? i never new that lol well we all learn new stuff everyday dont we

  13. #13
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: Alarm Clock

    Quote Originally Posted by randem
    Harsh Gupta,

    What????
    sorry for late reply.............i wanted to ask you to explain the process you suggested before!!!

    sorry for my bad language!!!!
    Show Appreciation. Rate Posts.

  14. #14
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Alarm Clock

    Harsh Gupta,

    If you use an NT base OS (Win NT,2000,XP) you can go to the control panel and create a task that you can schedule to run whenever you like. Or you can create one at the DOS command prompt using th AT command. For more info on the AT command... at the command prompt key in AT /?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width