Solved

sysInfo.ocx cannot get events

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
vb6 connector to SQL Server 2 38
VBA Shell can't Find Word document 11 114
vbModal 12 57
Create Files based on Cell Values in a Range in Excel 12 43
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
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.

820 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