Utility to turn off laptop display

A quick google search pointed me towards this small (~85kB) utility. It works fine in Win7 for me, but it requires .net framework.


Here's a 1-KiB program that does that... no .NET Framework or anything else needed. :)

The source code is literally 3 lines:

#include <windows.h>
int main(void)
{ return SendMessage(GetShellWindow(), WM_SYSCOMMAND, SC_MONITORPOWER, 2) != 0;}

Base64 encoding of executable:

TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyAAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1vZGUuDQ0KJAAAAAAAAAABkNvfRfG1jEXxtYxF8bWMhv7ojEbxtYxF8bSMR/G1jIb+1oxE8bWMhv7vjETxtYxSaWNoRfG1jAAAAAAAAAAAAAAAAAAAAABQRQAATAEBAB0o1E4AAAAAAAAAAOAADwELAQcKAAIAAAAAAAAAAAAADBAAAAAQAAAAIAAAAABAAAAQAAAAAgAABAAAAAAAAAAEAAAAAAAAAAAgAAAAAgAAAAAAAAIAAAQAABAAABAAAAAAEAAAEAAAAAAAABAAAAAAAAAAAAAAACwQAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC50ZXh0AAAAjgAAAAAQAAAAAgAAAAIAAAAAAAAAAAAAAAAAACAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABy
EAAAYBAAAAAAAABqAmhw8QAAaBIBAAD/FQQQQABQ/xUAEEAA99gbwPfYw1QQAAAAAAAAAAAAAIIQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAByEAAAYBAAAAAAAABaAUdldFNoZWxsV2luZG93AABCAlNlbmRNZXNzYWdlVwAAVVNFUjMyLmRsbA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