Simulate user interaction - avoid screen saver activation - Programmer

This is a discussion on Simulate user interaction - avoid screen saver activation - Programmer ; Hi! I need help to simulate programmatically user interaction on WinNT 4.0, to avoid screen saver activation. I try with key injection event. SendInput API and keybd_event API work correctly with Win2000 and WinXP system. Screen saver don't start. Under ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Simulate user interaction - avoid screen saver activation

  1. Simulate user interaction - avoid screen saver activation

    Hi!

    I need help to simulate programmatically user interaction on WinNT 4.0, to
    avoid screen saver activation.

    I try with key injection event.

    SendInput API and keybd_event API work correctly with Win2000 and WinXP
    system. Screen saver don't start.

    Under WinNT 4.0 these API, inject key event correctly at active application
    (ex. notepad) but system screen saver start !!!!

    I can use another windows API to avoid screen saver and simulate a user
    interaction ? I can use dos-bios interrupt for inject key avent under
    WINNT4.0 ? I can use a WINNT API to call bios interrupt routine?

    Thanks for your help!!!





  2. Re: Simulate user interaction - avoid screen saver activation

    On Thu, 28 Apr 2005 23:01:44 GMT, "Card.Starzinger"
    wrote:

    >Hi!
    >
    >I need help to simulate programmatically user interaction on WinNT 4.0, to
    >avoid screen saver activation.
    >
    >I try with key injection event.
    >
    >SendInput API and keybd_event API work correctly with Win2000 and WinXP
    >system. Screen saver don't start.
    >
    >Under WinNT 4.0 these API, inject key event correctly at active application
    >(ex. notepad) but system screen saver start !!!!
    >
    >I can use another windows API to avoid screen saver and simulate a user
    >interaction ? I can use dos-bios interrupt for inject key avent under
    >WINNT4.0 ? I can use a WINNT API to call bios interrupt routine?
    >
    >Thanks for your help!!!


    Check out WM_SYSCOMMAND

    case WM_SYSCOMMAND:
    switch (wparam&0xfff0)
    {
    case SC_SCREENSAVE:
    case SC_MONITORPOWER:
    return 0;//disable screen/power savers
    default:
    return DefWindowProc(hwnd,
    msg,wparam, lparam);
    }
    break;

    Jim

+ Reply to Thread