Solved

sysInfo.ocx cannot get events

Posted on 2013-12-31
2
301 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Re-position the objects 7 132
Work with App store 7 122
Assign a value in Excel V-Basic 3 38
Userform to show a range in excel. 3 34
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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 video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

752 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