Solved

sysInfo.ocx cannot get events

Posted on 2013-12-31
2
299 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
base64 decode encode 12 133
Excel VBA, find a string in a column, update a cell 7 78
Looking for VB6 code to read SQL table export it to ascii 8 38
Problem to picture file 20 49
There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
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.

776 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