 |
 |
If I have 2 monitors, and I want to send the command to sleep/wake up to only my second monitor, how can I do this? I'ma bit of a noob. 
|
|
|
|
 |
Hi guys
I need to know, how can I avoid turn back on by any activities like mouse move or keyboard press?
I mean, I want the monitor turns back on, only by a special activity, for example by clicking CTRL+R
Any help please?
|
|
|
|
 |
I tried this on windows 10 and it seems to only just wake the monitor for a sec and then it shortly goes back off. If you are simply trying to wake the machine. you can fix this by simply moving the mouse. You can use the code below:
[DllImport("user32.dll")]
static extern void mouse_event(Int32 dwFlags, Int32 dx, Int32 dy, Int32 dwData, UIntPtr dwExtraInfo);
private const int MOUSEEVENTF_MOVE = 0x0001;
mouse_event(MOUSEEVENTF_MOVE, 0, 1, 0, UIntPtr.Zero);
You can go to the link below from whence I stole it:
Window 10 - c# code to wake and turn on monitor[^]
|
|
|
|
 |
Can you please provide the explanation for rc file ?
or why is it needed
and batch file commands in details
Thanks
|
|
|
|
 |
first of all thanks for the code
can you please tell me the process to make the .exe file from the code given
or if there is some link
thanks in advance
|
|
|
|
 |
VirusTotal
Why UDP communications
64.4.10.33:123
????
|
|
|
|
 |
Hi Dalibor Drzik,
This is vaibhav patel.
I want to create the small java application which will run in background and will lock the desktop when one presses win+L key.
I have the query regarding the executable file you have created.When I unzipped your code i found four files.
1)monitoroff(c file)
2)monitoroff(rc file)
3)build(windows batch file)
4)icon
You have used lcc command in batch file which requires lcc compiler to be installed.
Would you help me to understand how exactly batch file works and makes the EXE file with the icon image?
Any help will be deeply appreciated.
Thanks in advance....
regards,
vaibhav patel
vaibhav.patel12@gmail.com
|
|
|
|
 |
i just want to turn off the monitor. So i used the below line.
SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, (LPARAM) 2);
The display is closed but it blinks 2 or 3 times before closing.
|
|
|
|
 |
I use remote desktop to logon to another machine. Since I don't need to use the monitor, I want to turn off the monitor. However, it seems this doesn't take effect. I guess it's because of the window handle is confined to the current remote desktop session. Is there a way to turn off the physical monitor in this case? Thanks!
|
|
|
|
|
 |
How can I really turn off the monitor? The equivalent to pressing the Power button on my monitor, meaning to power it down completely so that the user needs to press the monitor's power button to reactivate the monitor.
Thanks.
|
|
|
|
|
 |
HI
I want to turn off the monitor when ever the user comes out of the client system from the server directly. The client monitor should be 'on' when ever the monitor on/off button is pressed. when the monitor is 'on' the desktop icons should be in disabled, and a login button has to appear for the user to click on it, when ever the user clicks on login then the time has to be calculated from then to the monitor off.
Can any one give the c# coding for this along with namespaces that are to be used.
|
|
|
|
 |
HI every one:
Is there any way of turning on the monitor only by using mouse not using keyboard?
That is in power management I set monitor to turned off after 10 minutes but once I press a key in key board then my monitor is turned on ,I don’t want that to happen. The monitor should be turned on only if I use my mouse.
Is there anyway of doing it using a .bat code or some software????
|
|
|
|
 |
On your code monitor will ON when move the mouse.
But I want that monitor will not ON until I press Enter.
How can I do it?
|
|
|
|
 |
Hi, My requirements are to keep the Monitor ON for the Lifetime of my App. So how can it be done?
Thanks...
|
|
|
|
 |
THis looks like a VB forum but I'm sure you guys will be able to help me out here.Please do read on.
I made 2 batch files using poweroff3.0 by Jorgen Bosman and Wizmo By Steve Gibson for the following purpose
1.mute and turnoff the monitor -mute with wizmo, turnoff with poweroff
2.unmute and power on monitor - unmute with wizmo, turn on with poweroff
the code for the two batch files is
-----------------------batch file#1--------------------------
:: monoffmute.bat
:: turn off monitor and mutes sound
::
@ECHO OFF
C:\poweroff monitor_off
C:\wizmo mute=1
-----------------------batch file #2-------------------------
::mononsoundon.bat
:: turn on monitor and un-mutes sound
::
@ECHO OFF
C:\poweroff monitor_on
C:\wizmo mute=0
---------------------------------------------------
I then assigned 2 separate keys on my Pinnacle TV tuner (PCTV plus 110i) for running both above batch files.
My problem is that the monitor turns off from the remote(and green light turns to amber on monitor), but turns back on because TV/VIDEO/MUSIC app is playing.any activity on the screen turns on the monitor.So the trick doesn't work as I envisaged.I want the monitor to stay turned off no matter what it is playing.It should turn on only when i press the button that i programmed to do so!
How do I achieve that?
Thanks a lot for your time
Neelesh Bhagwat
If you have a suggestion please post or mail me on bhagwatnp2@gmail.com
Neelesh
"wannabe" HTPC enthusiast
|
|
|
|
 |
hey guys im super new to all this coding stuff... and i thought it would be pretty neat to make a program where i press a button and monitor turns off...
so #1 wat do i do with that source thing i downloaded...wen i double click the files they open in c++ and i have no idea wat to do with that code...#2 can i make this work in vb6? any help would be great ty!!!
|
|
|
|
 |
First, thanks for the code.
Saved me some time looking up win api code
But what is really the diffence between standby and off?
I've tested both (I'm currently on my laptop) and can't see any diffence...
Regards,
Oyvind Eriksen
|
|
|
|
 |
hi all,
i have impelemented by your method, it works fine, but not for below case:
while playing songs by mediaplayer (or other players), i manually switch monitor off by that funciton, it works till player change to next song.
anyway to keep it always blank unless only when i keypressed or mousemoved?
thanks
|
|
|
|
 |
Is there any way to change monitor's (display)brightness and contrast by code?
Thx for any help...
|
|
|
|
|
 |
Great program! I like it.
And is there a similar solution to directly turn off a hard-disk?
I need such a small program for testing purposes!
Please help 
|
|
|
|
 |
Hi,
Can you use this to detect when a screen goes into a different power mode? I would like to make an application which pauses itself when the machine is unattended for a period of time and was going to use the screen going into power-save mode. I found the SENS COM+ interface which notifies an application of a bunch of useful things. I had assumed that the screensaver notification it delivers would also tell me about the screen blanking if the energystar setting is selected, but it doesn't.
|
|
|
|
 |
I rated this as a 5 (to my surprise), because I like simple solutions to problems. I know finding the solution is not always easy, which you did. I hope some one adds this to a FAQs some where.
INTP
Every thing is relative...
|
|
|
|
 |
I can use SendMessage or PostMessage to turn on or turn off the monitor. The problem is I have multiple VGA cards that link to multiple monitors. I just want to turn off the individual one. Can anybody help me?
|
|
|
|
 |
Hi,
This is nice exe and working perfectly.But i tried using C# and found its not workking , i think i am missing somewhere plz guid me .
I used the code as folows.
The name space I used is :
using System.Runtime.InteropServices;
Now I declared the varrbale
const int MONITOR_ON = -1;
const int MONITOR_OFF = 2;
const int WM_SYSCOMMAND = 0x0112;
const int SC_MONITORPOWER = 0xF170;
const UInt32 ES_CONTINUOUS = 0x80000000;
//declared methods
[DllImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool PostMessage(IntPtr hWnd, UInt32 Msg, int wParam, int lParam);
[DllImport("user32.dll")]
static extern IntPtr GetDesktopWindow();
// written following code in page load.
System.Threading.Thread.Sleep(2000);
PostMessage(GetDesktopWindow(), WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_OFF);
System.Threading.Thread.Sleep(2000);
Please help me out.
Regards,
Lalit Narayan Dubey
S/W Developer , Noida
|
|
|
|
 |
Works great ... in c++ ... how do i get it to work in vb ?
Stoopid SendMessage declare in vb doesnt work
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long
any ideas ?
:: For all the hours you save writing user progs in vb, you spend twice as long implenting one tiny windows API call ...
|
|
|
|
 |
...that you could even do this. Thanks for sharing!
Cheers,
Tom Archer - Archer Consulting Group
"So look up ahead at times to come, despair is not for us. We have a world and more to see, while this remains behind." - James N. Rowe
|
|
|
|
 |
Wha-a! Great! Thank you I don't know that it is posible!
Wormhole is the God divided by zero
|
|
|
|