My monitor's power button is broken - how do I black out the display without unplugging it?
Since you're having issues with the other answers so far:
- "it prevent my program from running"
- "I think it's not force turn off the display. I've just test it"
- "the main problem is how to keep my program running with black screen. Most third party program stopped my program from running."
You're saying pretty clearly that your mystery program is just not going to co-operate with a software solution. You're just going to have to "think outside the desktop" & tackle the real problem:
Fix the power button.
You might get lucky and it's just dirty (like a remote control), or you say "it's missing the button to press" so just replace it with any similar shaped object, wood, plastic, a marble, tape it in & press away.
Or at least do the next best thing:
Install another power switch inline on the monitor's power cord
Use an inline lamp switch / inline rocker switch:
They're quite easy to install, just carefully strip the wire & attach according to the specific switch, there shouldn't even be any soldering or shrink tubing required. They usually only switch the "hot" wire, and of course unplug the wire first! Better search for how to install an inline rocker switch to see some videos too.
Oops, I just read the "I don't want to cover the monitor" line, after typing the next part... Well, give it a second thought, it's probably the easiest solution. Just put some cloth over the monitor & cover it up. It shouldn't be hot enough to start a fire or anything hazardous (if it is that's a separate problem), so buy a cover or use a shirt or a cardboard box, basically anything opaque.
If you're concerned about extra heat from covering it completely wearing away at the remaining life of your monitor, then don't cover it up completely. You really only need to block the screen side, so lean a piece of cardboard up against the screen, or optionally use paperclip "hooks" to hold/hang it, and let the other 5 sides breathe free:
A nearly-finished DIY screen cover, just bend to fit.
I recommend getting a power strip and installing it within reach of your foot or hand. Not sure where you live but I can buy one for about $2 - $3.
This way you can plug the monitor into this switch and power it on/off whenever you need.
IMPORTANT - for daisy-chaining
Make sure to get a simple power strip and NOT a surge protection device or else you will have the potential to create a fire hazard. As long as your house's circuit breaker maintains complete control of your circuit then it should be relatively safe to plug in nothing more than a monitor via daisy-chaining.
Try changing the input of your monitor to a source with no video eg: vga. Most modern monitors have multiple inputs and you can manually select the one you want. Then, it will tell you there is no source and then go to sleep.