Windows 10: .NET user32.dll monitor state OFF acting as standby. Fix?

Discus and support .NET user32.dll monitor state OFF acting as standby. Fix? in Windows 10 Drivers and Hardware to solve the problem; When switching the monitor state to OFF using sendmessage user32.dll, .net, C#, windows 10 pro, the monitor goes black, which is as intended. Any input... Discussion in 'Windows 10 Drivers and Hardware' started by AstromanRB, Jan 21, 2021.

  1. .NET user32.dll monitor state OFF acting as standby. Fix?


    When switching the monitor state to OFF using sendmessage user32.dll, .net, C#, windows 10 pro, the monitor goes black, which is as intended. Any input remote input in this case or activity will set the monitor back to the ON state.

    I feel this is what the "STANDBY" state is supposed to do, while the OFF state is supposed to stay off until I activate the monitor with another sendmessage, or restart the system. As well, standby seems to do nothing? Is this intended?

    I would like a solution to the problem. I would like to make "off" off and "standby" standby.
    I have a screen on a laptop that must remain open for diagnostic reasons, but only visible at specific times, unless the system is viewed remotely, in which case all diagnostics should become visible only to the remote viewer, and not to onlookers of the laptop screen.
    I do not want people to touch the laptop for sanitation and security reasons. I need the system to run. I need the monitor off at specific times. An external monitor is not viable.


    I'm not sure what I need to change, Registry? Code? Drivers? Group policy?

    I know there are other "solutions" to the issue. Use an external monitor with a smart outlet, replace the LID driver with volume manager, switch the primary screen to the laptop with the lid closed, connect to an external monitor. These deviations will not work.

    Once again, let me be very clear. I need to programmatically turn off, and programmatically turn on the monitor of the laptop.
    Programmatically turning off the monitor has been achieved. Programmatically turning ON the monitor has failed, as the monitor turns on automatically by activity and remote input.
    Essentially, the monitor must stay off until specified to do otherwise through code.
    Changing the power options of devices to disallow them to wake the PC is meaningless and irrelevant.


    I believe the monitor states are not valid for windows 10, possibly defined by a pervious version of windows. Why does standby do nothing? Why does off act as standby?
    I'm trying to be very clear because I've inquired about this issue in several other places and got a great deal of misunderstanding.


    No, this is not a "power and sleep" option. No, this is not a hibernate state. No, the laptop is not sleeping.
    As far as I've checked, unless there's some manipulation of the task scheduler that I'm unaware of, this doesn't seem to be a control panel setting.


    There are several nested questions in this post, but the primary question is: How can I disable the monitor from switching back to the "ON" state through input/activity, and only allow the monitor to return to the "ON" state once a user32.dll message to do so has been received, or possibly system restart?

    Any help with this matter is highly appreciated. Thank you.


    I have tried the following code:


    1. public enum MonitorState
    2. {
    3. ON = -1,OFF = 2,STANDBY = 1
    4. }


    CODE 1:

    1. [DllImport"user32.dll"]
    2. static extern IntPtr SendMessageIntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam;
    3. public static void SetMonitorStateMonitorState state
    4. {
    5. SendMessagenew Form.Handle, WM_SYSCOMMAND, IntPtrSC_MONITORPOWER, IntPtrstate;
    6. }


    CODE 2:

    1. [DllImport"user32.dll"]
    2. static extern IntPtr PostMessageint hWnd, int msg, int wParam, int lParam;
    3. public static void SetMonitorStateMonitorState state
    4. {
    5. PostMessage-1, intWM_SYSCOMMAND, SC_MONITORPOWER, intstate;
    6. }

    :)
     
    AstromanRB, Jan 21, 2021
    #1

  2. User32.dll problem

    Hi Chris,

    Experiencing User32.dll errors when running a program or application could be caused by a damaged, deleted, or removed User32.dll file. It's also possible that the program or application is accessing User32.dll incorrectly, or your computer could be infected
    with a virus that's why it's not working properly.

    This error is normally corrected by repairing the User32.dll file or by reinstalling the program, the hardware component, or the driver that is causing the error. If these procedures do not correct the User32.dll error, you can restore your computer to a
    condition before the error appeared by using the Windows System Restore feature.

    By the way, for us to derive to the appropriate recommendation, we would like to know the following:

    • Were there any recent changes or updates performed on your PC?
    • Does the error only appear when running a specific application or program?
    • If yes, what was the application or program?

    Looking forward to your reply.

    Regards.
     
    Vanessa Yar, Jan 21, 2021
    #2
  3. Chris_62 Win User
    User32.dll problem

    I tried to run an RAdmin application but an error message displays: USER32.dll.DefWindowProcW Can't load function from library.

    How can the User32.dll be updated or fixed.
     
    Chris_62, Jan 21, 2021
    #3
  4. .NET user32.dll monitor state OFF acting as standby. Fix?

    ADVAP132.dll USER32.dll GD132.dll VERSION.dll repair

    ADVAP132.dll USER32.dll GD132.dll VERSION.dll repair
     
    checkmatewht, Jan 21, 2021
    #4
Thema:

.NET user32.dll monitor state OFF acting as standby. Fix?

Loading...
  1. .NET user32.dll monitor state OFF acting as standby. Fix? - Similar Threads - NET user32 dll

  2. User32.dll error

    in Windows 10 Installation and Upgrade
    User32.dll error: The procedure entry point SystemParameterslnfoForDpi could not be located in the dynamic link library USER32.dll.This error has been popping up on my laptop whenever I StartFragmentWhen I install the softwareEndFragmentHow can I fix this error?EndFragment...
  3. User32.dll error

    in Windows 10 Gaming
    User32.dll error: The procedure entry point SystemParameterslnfoForDpi could not be located in the dynamic link library USER32.dll.This error has been popping up on my laptop whenever I StartFragmentWhen I install the softwareEndFragmentHow can I fix this error?EndFragment...
  4. User32.dll error

    in Windows 10 Software and Apps
    User32.dll error: The procedure entry point SystemParameterslnfoForDpi could not be located in the dynamic link library USER32.dll.This error has been popping up on my laptop whenever I StartFragmentWhen I install the softwareEndFragmentHow can I fix this error?EndFragment...
  5. Turning off a monitor acts like disconnecting it

    in Windows 10 Drivers and Hardware
    Turning off a monitor acts like disconnecting it: I have two monitors, both connected on DP.When I turn off my secondary monitor, nothing happens. That's good.When I turn off my primary monitor, something happens: Windows acts as though it was disconnected, and moves all windows and desktop icons over to the much smaller...
  6. Turning off a monitor acts like disconnecting it

    in Windows 10 Gaming
    Turning off a monitor acts like disconnecting it: I have two monitors, both connected on DP.When I turn off my secondary monitor, nothing happens. That's good.When I turn off my primary monitor, something happens: Windows acts as though it was disconnected, and moves all windows and desktop icons over to the much smaller...
  7. Turning off a monitor acts like disconnecting it

    in Windows 10 Software and Apps
    Turning off a monitor acts like disconnecting it: I have two monitors, both connected on DP.When I turn off my secondary monitor, nothing happens. That's good.When I turn off my primary monitor, something happens: Windows acts as though it was disconnected, and moves all windows and desktop icons over to the much smaller...
  8. Turning off a monitor acts like disconnecting it

    in Windows 10 Drivers and Hardware
    Turning off a monitor acts like disconnecting it: I have two monitors, both connected on DP. When I turn off my secondary monitor, nothing happens. That's good. When I turn off my primary monitor, something happens: Windows acts as though it was disconnected, and moves all windows and desktop icons over to the much...
  9. Hal.dll, Kernel32.dll, User32.dll files explained

    in Windows 10 News
    Hal.dll, Kernel32.dll, User32.dll files explained: [ATTACH] [ATTACH]Today, we are explaining three Windows OS system files — Hal.dll, Kernel32.dll, User32.dll. These system files are part of Win32 API DLLs that work together to complete a task which users get to see. These files are OS files, and should [...] This post...
  10. ADVAP132.dll USER32.dll GD132.dll VERSION.dll repair

    in Windows 10 BSOD Crashes and Debugging
    ADVAP132.dll USER32.dll GD132.dll VERSION.dll repair: ADVAP132.dll USER32.dll GD132.dll VERSION.dll repair https://answers.microsoft.com/en-us/windows/forum/all/advap132dll-user32dll-gd132dll-versiondll-repair/2d5a27b3-161a-40f5-8511-1f069195100a