Screen blanking with dual monitors?

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Screen blanking with dual monitors?

Post 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
bjlamarca
Member
Posts: 83
Joined: Wed Apr 13, 2005 1:09 am
Location: White Plains, NY

Blank on screen

Post 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
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Post 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
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post 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.
Scott
bjlamarca
Member
Posts: 83
Joined: Wed Apr 13, 2005 1:09 am
Location: White Plains, NY

Post 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.
switzch
Member
Posts: 60
Joined: Thu Jan 15, 2004 11:17 am
Location: Toronto, On

Post 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.
bjlamarca
Member
Posts: 83
Joined: Wed Apr 13, 2005 1:09 am
Location: White Plains, NY

Dual Screen Blanking

Post by bjlamarca »

Switzch,



can you give more details about your time out box?
switzch
Member
Posts: 60
Joined: Thu Jan 15, 2004 11:17 am
Location: Toronto, On

Post 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!
switzch
Member
Posts: 60
Joined: Thu Jan 15, 2004 11:17 am
Location: Toronto, On

Post by switzch »

Here is a thread from a while back when I was trying to do this:



http://www.promixis.com/phpBB2/viewtopi ... highlight=
Optimus_Prime
Member
Posts: 1
Joined: Thu Jul 21, 2005 10:07 am
Location: Northern AL, USA
Contact:

Has anyone found new info on this topic?

Post 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?
Resistance is futile.

Your biological and technological distinctiveness will be added to our own.

You will become one with the morgue.
Post Reply