Keeping a System "alive"
-
I'm writing an app for a system that is configured by the IT department to turn on the screen saver after 15 minutes of inactivity, and requires a password when the system is re-activated. I tried programatically moving the mouse 100 pixels and then immediately back to it's original position, but that didn't work. I've also tried broadcasting the SC_HOTKEY message. This kind of worked, but when I closed the app, it crashed. Does anyone have any ideas? ------- sig starts "I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
-
I'm writing an app for a system that is configured by the IT department to turn on the screen saver after 15 minutes of inactivity, and requires a password when the system is re-activated. I tried programatically moving the mouse 100 pixels and then immediately back to it's original position, but that didn't work. I've also tried broadcasting the SC_HOTKEY message. This kind of worked, but when I closed the app, it crashed. Does anyone have any ideas? ------- sig starts "I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
Just to clarify, are you trying to inhibit the screen saver from going off? I'm suspecting yes is the answer, which prompts the next question, once the screen saver has gone off, what's that do to your app such that it stops doing what it's supposed to be doing? Chris Meech I am Canadian. [heard in a local bar] When I want privacy, I'll close the bathroom door. [Stan Shannon] BAD DAY FOR: Friendly competition, as Ford Motor Co. declared the employee parking lot at its truck plant in Dearborn, Mich., off limits to vehicles built by rival companies. Workers have to drive a Ford to work, or park across the street. [CNNMoney.com] Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
-
Just to clarify, are you trying to inhibit the screen saver from going off? I'm suspecting yes is the answer, which prompts the next question, once the screen saver has gone off, what's that do to your app such that it stops doing what it's supposed to be doing? Chris Meech I am Canadian. [heard in a local bar] When I want privacy, I'll close the bathroom door. [Stan Shannon] BAD DAY FOR: Friendly competition, as Ford Motor Co. declared the employee parking lot at its truck plant in Dearborn, Mich., off limits to vehicles built by rival companies. Workers have to drive a Ford to work, or park across the street. [CNNMoney.com] Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
The problem is that the user has to log back on to the system after the screen saver comes on. I want to prevent the screensaver from coming on in the first place. I can't just turn the screensaver off because that's not permitted under our security policies. The app that will be doing this is in a hospital Emergency Room, and they don't want the screen to go into screensaver mode at all.Instead of fighting with the IT idiots, I just want to simulate activity that doesn't otherwise inhibit actual use of the program. ------- sig starts "I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
-
I'm writing an app for a system that is configured by the IT department to turn on the screen saver after 15 minutes of inactivity, and requires a password when the system is re-activated. I tried programatically moving the mouse 100 pixels and then immediately back to it's original position, but that didn't work. I've also tried broadcasting the SC_HOTKEY message. This kind of worked, but when I closed the app, it crashed. Does anyone have any ideas? ------- sig starts "I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
SetThreadExecutionState(ES_DISPLAY_REQUIRED|ES_CONTINUOUS);
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ -
The problem is that the user has to log back on to the system after the screen saver comes on. I want to prevent the screensaver from coming on in the first place. I can't just turn the screensaver off because that's not permitted under our security policies. The app that will be doing this is in a hospital Emergency Room, and they don't want the screen to go into screensaver mode at all.Instead of fighting with the IT idiots, I just want to simulate activity that doesn't otherwise inhibit actual use of the program. ------- sig starts "I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
Oooooooops~~ "this is in a hospital Emergency Room" ??! have you thought about that your application may fail for whatever reason? Then, who will response for that if it happens? If I were you, I would like to write a formal report to your boss to talk about this issue instead of taking some technical way to hide it. What do you think about it? Regards, Chris
-
The problem is that the user has to log back on to the system after the screen saver comes on. I want to prevent the screensaver from coming on in the first place. I can't just turn the screensaver off because that's not permitted under our security policies. The app that will be doing this is in a hospital Emergency Room, and they don't want the screen to go into screensaver mode at all.Instead of fighting with the IT idiots, I just want to simulate activity that doesn't otherwise inhibit actual use of the program. ------- sig starts "I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
I'd be interested to hear if Michael's suggestion does the trick. The MSDN documentation specifically states that the function will not prevent the screen saver from executing, but we all now how that can be wrong. The docs also state that the call should be used by multimedia players when playing long videos and I have often wondered how my video recording software accomplished just that. This likely is the reason. Chris Meech I am Canadian. [heard in a local bar] When I want privacy, I'll close the bathroom door. [Stan Shannon] BAD DAY FOR: Friendly competition, as Ford Motor Co. declared the employee parking lot at its truck plant in Dearborn, Mich., off limits to vehicles built by rival companies. Workers have to drive a Ford to work, or park across the street. [CNNMoney.com] Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
-
Oooooooops~~ "this is in a hospital Emergency Room" ??! have you thought about that your application may fail for whatever reason? Then, who will response for that if it happens? If I were you, I would like to write a formal report to your boss to talk about this issue instead of taking some technical way to hide it. What do you think about it? Regards, Chris
-
I'd be interested to hear if Michael's suggestion does the trick. The MSDN documentation specifically states that the function will not prevent the screen saver from executing, but we all now how that can be wrong. The docs also state that the call should be used by multimedia players when playing long videos and I have often wondered how my video recording software accomplished just that. This likely is the reason. Chris Meech I am Canadian. [heard in a local bar] When I want privacy, I'll close the bathroom door. [Stan Shannon] BAD DAY FOR: Friendly competition, as Ford Motor Co. declared the employee parking lot at its truck plant in Dearborn, Mich., off limits to vehicles built by rival companies. Workers have to drive a Ford to work, or park across the street. [CNNMoney.com] Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
Nope, didn't work, and I even tried using the WM_POWERMESSAGE handler in WndProc too. Nothing seems to be able to keep this from happening. I've kinda given up - gotta move on. ------- sig starts "I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
-
Nope, didn't work, and I even tried using the WM_POWERMESSAGE handler in WndProc too. Nothing seems to be able to keep this from happening. I've kinda given up - gotta move on. ------- sig starts "I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
I see you didn't have success. Too bad. Did you come across this article[^] when researching. It seems to suggest that it will work. Chris Meech I am Canadian. [heard in a local bar] When I want privacy, I'll close the bathroom door. [Stan Shannon] BAD DAY FOR: Friendly competition, as Ford Motor Co. declared the employee parking lot at its truck plant in Dearborn, Mich., off limits to vehicles built by rival companies. Workers have to drive a Ford to work, or park across the street. [CNNMoney.com] Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
-
SetThreadExecutionState(ES_DISPLAY_REQUIRED|ES_CONTINUOUS);
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQI happend to face the same problem. This solution seems to work, but you should keep in mind that it does nothing more but resetting some timers. So you need to create a timer event and invoke the function when the timer expires. Thanks for this idea however!:):)
-
I happend to face the same problem. This solution seems to work, but you should keep in mind that it does nothing more but resetting some timers. So you need to create a timer event and invoke the function when the timer expires. Thanks for this idea however!:):)
You shouldn't have to do that if you pass the
ES_CONTINUOUS
flag--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ