Click to See Complete Forum and Search --> : A question for only the greatest minds of our time
Joey_k29
Aug 28th, 2001, 08:23 AM
I am experiencing a problem with a computer program I designed. It is installed on windows 95 laptops. After 20 minutes of inactivity, they switch to some type of suspend mode. I disabled the automatic suspend on the machines, yet they still drop into suspend. The problem is that when they drop into suspend, my program crashes. Is there any way I can prevent the computer from going into suspend? I have tried to send a keycode every 10 minutes or so, but that does not seem to register activity. I may have done it wrong. Any help would be greatly appreciated, but I ask that you be quite sure that it works on windows 95, because I have code for blocking the suspend in windows 98 that does not work in 95. Thank you for your time. Good luck. I know I need it.
Sincerely,
Joe
Nucleus
Aug 28th, 2001, 08:38 PM
Funny way to phrase a question.
If you don't want to turn the suspend mode off (recommended) then you can adapt your application.
simply add the Microsoft sysinfo control.
Private Sub SysInfo1_PowerResume()
'code when power resumes
End Sub
Private Sub SysInfo1_PowerSuspend()
'code when power is suspended
End Sub
I am sure you see the potential to adapt your app to prevent it from crashing :)
Joey_k29
Aug 30th, 2001, 09:07 AM
I have already tried that before. Although it works well with windows 98 and ME, it does not seem to work with the problem I am experiencing in windows 95. I believe the hard drive is spinning down and causing the computer to go into a type of "suspend." I think the only way to prevent this is to simulate some kind of keystroke or mouse movement to convince the hard drive that there is still activity. Thank you for your time and any suggestions. If you know how to simulate keystrokes or mouse movement in a situation similar to this, I would appreciate it.
Joe
mlewis
Aug 30th, 2001, 09:11 AM
I think the problem is that the computer is expecting the system to generate a true electronic input signal; not a simulated one. I have tried similar things in the past; it doesn't work correctly.
Make absolutely certain that in the Power dialog (control panel) all settings are set to Never. This will prevent power down.
Also, make certain that in BIOS setup (usually press DEL or ESC or something on bootup) all power settings are disabled.
Joey_k29
Aug 30th, 2001, 09:20 PM
I have done all of that. That is not the problem. I think generating activity may work, but I am not entirely sure. Any suggestions would be helpful at this point. Thank you for your post.
Joe
assbeef
Sep 2nd, 2001, 09:59 PM
What exactly does your program do? What part of your program crashes? Maybe there is another way around it.
Joey_k29
Sep 3rd, 2001, 12:01 AM
My program runs an operation based on the visual basic timer. After so many seconds a function is executed; the crash is a result of this timer functioning incorrectly in the "suspended mode." I hope this helps. Thank you again
Joe
mlewis
Sep 18th, 2001, 12:05 PM
I am not sure, but try this:
make a project where the timer goes off every 30 seconds or so, and each time it fires it writes a line to a text file, along with the current time
put the machine in suspend mode
wait about 5 min
wake it up
check file, see if lines are there that should be
It may be that NOTHING happens while the machine is in suspend, if so that may be causing problems
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.