Results 1 to 4 of 4

Thread: [RESOLVED] Background Worker

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2008
    Location
    Dominican Republic
    Posts
    733

    Resolved [RESOLVED] Background Worker

    Hi!! I made a program that if the date of the DateTimePicker1 = the actual date, then i would turn off the computer...

    Ok, so that was easy... But the problem comes when i want to close the program... Is there any way to have the program working in the background comparing both dates and when they are the same, turns off the computer?
    "In our profession, precision and perfection are not a dispensable luxury, but a simple necessity."
    Niklaus E. Wirth


    Rate any post that helped you, it's a good way of saying thanks
    Please specify your Visual Studio Version!

    Why rating is useful

    My Code Bank Submissions: How to determine Windows Version| Working With Mouse Events | Blocking Input Using API | Get host's IP | Minimize to system tray "animated" | Colored ListBox (custom fonts, colors, highlight) Updated -New Class! | [VS 2008] Strong encryption and hashing class - Updated! 31/August/2009 | Create a shortcut using IWshRuntimeLibrary

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Background Worker

    I have provided a submission in the CodeBank that shows how to minimise to the notification area (system tray) instead of closing. That way your app is still running and, therefore, still processing. Follow the advice in my signature to find the thread.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    Fanatic Member manhit45's Avatar
    Join Date
    May 2009
    Location
    Ha noi - Viet Nam
    Posts
    826

    Re: [RESOLVED] Background Worker

    That s right, you do followwing jm , and remember use timer to compare date,

    i dont know clearly about your program but the date which you said is that timeofday?

    if so you use datatimepicker what for.

    and if not , it is date , so user have to use more 1 days then computer will turnoff ?

    or you have opotion time for turning off computer .



    Last edited by manhit45; May 6th, 2009 at 10:13 PM.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2008
    Location
    Dominican Republic
    Posts
    733

    Re: [RESOLVED] Background Worker

    I'm using the DateTimePicker, but the command that I'm using to turn off the computer isn't working... I gotta check that.

    I'm using a timer to check every hour if the dates are the same....
    "In our profession, precision and perfection are not a dispensable luxury, but a simple necessity."
    Niklaus E. Wirth


    Rate any post that helped you, it's a good way of saying thanks
    Please specify your Visual Studio Version!

    Why rating is useful

    My Code Bank Submissions: How to determine Windows Version| Working With Mouse Events | Blocking Input Using API | Get host's IP | Minimize to system tray "animated" | Colored ListBox (custom fonts, colors, highlight) Updated -New Class! | [VS 2008] Strong encryption and hashing class - Updated! 31/August/2009 | Create a shortcut using IWshRuntimeLibrary

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