Solved

sysInfo.ocx cannot get events

Posted on 2013-12-31
2
294 Views
Last Modified: 2014-01-04
Experts, i am working on an application where i will be using the setSuspendState api function to put the pc into sleep mode is certain cases. I am trying to use the sysInfo.ocx control to get the events when the pc actually goes into sleep mode and when it wakes up. If i put the computer to sleep through the start menu i get the events. But when i do it programatically i do not get the events. Does anyone know a way around this? I have also tried subclassing to get the WMPower stuff and then i only get the awake message but still never get the sleep message.
0
Comment
Question by:Basicfarmer
2 Comments
 
LVL 17

Accepted Solution

by:
John Gates earned 500 total points
ID: 39756513
Have you tried a method like this to put the system in to sleep mode:

http://www.nullskull.com/a/777/net-lock-logoff-reboot-shutdown-hibernate-standby.aspx

Hope this helps!
-D-
0
 

Author Closing Comment

by:Basicfarmer
ID: 39757020
Perfect, thanks...
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now