Page 1 of 1

Screen blanking with dual monitors?

Posted: Mon May 02, 2005 5:07 pm
by dlmorgan999
I am using a single computer for both HTPC and HouseBot duties. Right now I am in the process of getting set up for dual monitor support. One monitor will be a touchscreen LCD that I will use for running the HouseBot software remote. The second monitor is my HDTV projector that I will use for displaying Meedio Essentials and for viewing movies.



I got everything working great *except* that my hope was to be able to blank the screen on the LCD panel when I'm not using the software remote (typically while watching a movie). I discovered that when I blank that monitor it also blanks the other monitor (the HDTV projector).



Is it even possible to implement screen blanking on one output of a dual-head video card? If so then I'll submit this as a feature request. If not I'll consider getting a cheap PCI card to handle the touchscreen.



-- Dave

Blank on screen

Posted: Mon May 02, 2005 9:51 pm
by bjlamarca
I have a similar situation, but I use separate video cards for the touch screen and video out. I can't figure out how to blank one of the screens. How did you plan to do it if you had two video cards?



Thanks,



Bryan

Posted: Mon May 02, 2005 9:57 pm
by dlmorgan999
Hi Bryan,



I made the assumption that if I had a separate video card then the blanking would work correctly. But now that I think about it some more I suppose this is no different than a single dual-head card. If this is the case then I'm not sure what I'll do.



-- Dave

Posted: Mon May 02, 2005 10:09 pm
by ScottBot
The Windows (non CE) Software Remote simply sends the WM_SYSCOMMAND/SC_MONITORPOWER message with a parameter of "2". Can't really say too much more about it. There's a reference to the command here.



I think it does the same thing as the power scheme option on Windows. I don't know any way to single out a particular monitor.

Posted: Mon May 02, 2005 10:17 pm
by bjlamarca
I did some searching and found a utility for Macs:



http://mac.sofotex.com/download-127663.html



but nothing for Windows, hopfully someone will figure out a way.

Posted: Mon May 02, 2005 11:55 pm
by switzch
I have this exact problem. Right now the only solution is to make a 1 min time out that pops up a full screen black box on the touchscreen. Certianly not the best solution, but it works.

Dual Screen Blanking

Posted: Tue May 03, 2005 11:28 am
by bjlamarca
Switzch,



can you give more details about your time out box?

Posted: Tue May 03, 2005 11:50 am
by switzch
I am using girder. I can send you the GML if you would like.



Basically it has a 60sec timeout, if no action has been done it creates a black box that covers the entire screen. I have this box set for 0% opacity, but you can make it whatever you want.



As well as this works its not great. A black monitor is not the same as a blank (off) monitor, plus anytime I change channels, ect the box will go away.



I have emailed & called ATI and requested that they add this feature to their drivers, but I have heard nothing. If you figure out how to do this I would be very interested. I will try to find my old threads if you want to continue digging, it must be possible somehow!

Posted: Tue May 03, 2005 11:55 am
by switzch
Here is a thread from a while back when I was trying to do this:



http://www.promixis.com/phpBB2/viewtopi ... highlight=

Has anyone found new info on this topic?

Posted: Thu Jul 21, 2005 10:25 am
by Optimus_Prime
I have a basic program being written to turn off a monitor of one's choice, but thus far I have no way of doing so. I can find the specific monitor, however the message to turn off the monitor does not take the monitor as an input. Here is the code up to now. (This code is from before my first compile so it may be buggy.)


Code: Select all

BOOL GetHMonitors(HMONITOR *hMon1, HMONITOR *hMon2, int *ErrorCode)
{
BOOL		Success;
MONITORINFO	mi1, mi2;
POINT		pt1, pt2;

pt1.x = 0;
pt1.y = 0;
pt2.y = 0;
mi1.cbSize = sizeof(mi1);
mi2.cbSize = sizeof(mi2);
*hMon1 = MonitorFromPoint(pt1, MONITOR_DEFAULTTOPRIMARY);
if (Success = GetMonitorInfo( hMon1, &mi1))
{
	pt2.x = mi1.rcMonitor.right + 1;
	*hMon2 = MonitorFromPoint(pt2, MONITOR_DEFAULTTONEAREST);
	if (Success = GetMonitorInfo( hMon2, &mi2))
	{
		if ( mi1.rcMonitor.right == mi2.rcMonitor.right && mi1.rcMonitor.left == mi2.rcMonitor.left && mi1.rcMonitor.top == mi2.rcMonitor.top && mi1.rcMonitor.bottom == mi2.rcMonitor.bottom)
		{
			Success = FALSE;
			*ErrorCode = 2;
		}
	}
	else
	{
		*ErrorCode = 1;
	}
}
else
{
	*ErrorCode = 1;
}
return Success;
}

Button1()
{
	HMONITOR	hMon1, hMon2;
	int		ErrorCode = 0;

	if (GetHMonitors( &hMon1, &hMon2, &ErrorCode))
	{
		SendMessage(hMon1, WM_SYSCOMMAND, SC_MONITORPOWER, 2);
	}
	else if (ErrorCode == 1)
	{
		MessageBox("Couldn't get Monitor Information!","Error");
	}
	else if (ErrorCode == 2)
	{
		MessageBox("Only 1 Monitor Found!","Error");
	}
	else
	{
		MessageBox("Unknown Error!","Error");
	}
}

Button2()
{
	HMONITOR	hMon1, hMon2;
	int		ErrorCode = 0;

	if (GetHMonitors( &hMon1, &hMon2, &ErrorCode))
	{
		SendMessage(hMon2, WM_SYSCOMMAND, SC_MONITORPOWER, 2);
	}
	else if (ErrorCode == 1)
	{
		MessageBox("Couldn't get Monitor Information!","Error");
	}
	else if (ErrorCode == 2)
	{
		MessageBox("Only 1 Monitor Found!","Error");
	}
	else
	{
		MessageBox("Unknown Error!","Error");
	}
}


The problem is that the SendMessage command does not accept the HMONITOR value even when cast as an HWND, i.e., (HWND) hMon1. What I'm fearing is that there may not be a way to specify which monitor to turn off with the SC_MONITORPOWER command.



I've also been looking into the display settings functions, which obviously require the ability to distinguish between multiple monitors, and I was wondering what would happen if I try setting the display settings to something stupid like setting the frequency to zero. Would that have the same effect as turning the monitor off?