Results 1 to 10 of 10

Thread: Prevent Windows From Going To Sleep And Screen Saver Start

  1. #1

    Thread Starter
    Frenzied Member HanneSThEGreaT's Avatar
    Join Date
    Nov 2003
    Location
    Vereeniging, South Africa
    Posts
    1,492

    Prevent Windows From Going To Sleep And Screen Saver Start

    Hello everyone!

    First post in here, I did a search first and saw there wasn't something like this

    This little app prevents Windows XP, Vista, 7 from going to sleep and prevents the screensaver from starting. Yes, you could obviously set the Interval of the Timer to anything you like, as this is just an example.

    I hope you like it, and if you have any improvements / ideas / suggestions, please let me know

    Hannes
    Attached Files Attached Files
    Last edited by Hack; Apr 10th, 2010 at 06:35 AM. Reason: Removed Compiled Code From Attachment
    VB.NET MVP 2008 - Present

  2. #2

    Thread Starter
    Frenzied Member HanneSThEGreaT's Avatar
    Join Date
    Nov 2003
    Location
    Vereeniging, South Africa
    Posts
    1,492

    Re: Prevent Windows From Going To Sleep And Screen Saver Start

    No comments or suggestions ¿
    VB.NET MVP 2008 - Present

  3. #3
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Prevent Windows From Going To Sleep And Screen Saver Start

    Hi,
    I think it's a nice idea... (I can't run your code as I have no VB.Net installed )

    But I found an EXE file in your zip. Better remove it and re-upload. Because, EXE files can't be trusted. Sometimes it may contain viruses. (I had tested your EXE and found no viruses at all )
    You should only include the source codes and resource files. No EXEs !

    Good luck...

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Prevent Windows From Going To Sleep And Screen Saver Start

    Not only no Exes, no compiled code of any kind, including DLLs, OCX, etc.

    Per this CodeBank policy, I have edited the attachment and removed all compiled code.

    We welcome and appreciate all entries into our Codebank, but ask that source code only be included with anything attached.

    Thank you.

  5. #5
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: Prevent Windows From Going To Sleep And Screen Saver Start

    Quote Originally Posted by HanneSThEGreaT View Post
    No comments or suggestions ¿
    Hi Hannes,
    Maybe you would arouse more interest if you explained a bit what purpose it serves, or how it works, if that is interesting in its own right. Mind you, nobody ever replies to my contributions either.

    cheers, BB

  6. #6

    Thread Starter
    Frenzied Member HanneSThEGreaT's Avatar
    Join Date
    Nov 2003
    Location
    Vereeniging, South Africa
    Posts
    1,492

    Re: Prevent Windows From Going To Sleep And Screen Saver Start

    Oops! I have to apologise for adding the exe as well. So sorry!. Won't happen again! Thanx Hack for fixing the attachment!

    Thanx for your interest everyone

    Hello Boops! Because it was my first ( of many hopefully ) submission, I think I didn't explain well enough what this project does. Here goes :

    Basically it disallows the screen saver to start, and stop the computer from going into sleep mode. this means that you can always have your app open and not be worried by them. The whole idea basically came from a post over at CodeGuru where a fellow member had to do this in one of his projects. I just found it very very interesting, and wanted to share this unique project with you guys

    Can you give me a link to one of your codebank submissions - they surely will be interesting!

    Hannes
    VB.NET MVP 2008 - Present

  7. #7
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: Prevent Windows From Going To Sleep And Screen Saver Start

    Well I don't want to hurt your feelings but I suspect I'm not part of your target audience for this one. I always have my screensaver set to [none] in the Windows control panel.

    My own recent (and second) contribution is about halfway down this page. But please don't reply to it just to please me: the other denizens of this CodeBank will think we're having a mutual bump fest. Besides, I have an enhanced version in the pipeline just in case it slips off the front page.

    BB

  8. #8
    Member
    Join Date
    Aug 2009
    Posts
    46

    Re: Prevent Windows From Going To Sleep And Screen Saver Start

    I have a question about this. On machines we sell to the government, they have a group policy that gets pushed out that sets the machines to sleep every 45 minutes, and hibernate an hour after that. we have software running on the machines to collect RFID tag data, and therefore need to keep them awake. If I read your code correctly, this app when run, will prevent the machine from going to sleep and from hibernating, correct?

    Thanks!

  9. #9

    Thread Starter
    Frenzied Member HanneSThEGreaT's Avatar
    Join Date
    Nov 2003
    Location
    Vereeniging, South Africa
    Posts
    1,492

    Re: Prevent Windows From Going To Sleep And Screen Saver Start

    Yes, that is correct.

    Thanks for your interest
    VB.NET MVP 2008 - Present

  10. #10
    New Member
    Join Date
    Oct 2012
    Posts
    1

    Re: Prevent Windows From Going To Sleep And Screen Saver Start

    sorry to resurrect an old post - but thanks you solved my problem after two days of trawling msdn

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