how could i capture the event when my computer switch display device?

laptop could redirect the display output to another device by pressing
Fn + special key, how could i know this happened? i have searched msdn
for sometime, hanvn't found any window message related. does anyone
know ?
0
9/10/2008 8:58:04 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
559 Views

Similar Articles

[PageSpeed] 53

"thinktwice" <memorialday@gmail.com> wrote in message 
news:ea3d8cfa-2c80-445f-899e-630ec0bd9239@a8g2000prf.googlegroups.com...
> laptop could redirect the display output to another device by pressing
> Fn + special key, how could i know this happened? i have searched msdn
> for sometime, hanvn't found any window message related. does anyone
> know ?

Some laptops don't even pass the Fn keys to Windows; the BIOS intercepts 
them and performs the monitor switching functions.  So in that case your 
Windows program can't do anything about it.  Sorry....

But other laptops have a Windows app running that actually does the switch. 
In fact, if that app is not running, pressing the Fn key doesn't do 
anything.  You can run Spy++ on that to see if there's any special Windows 
message or something that it gets.  But unfortunately, some of these apps 
get the Fn key from a special keyboard driver, which is usually 
undocumented.  In that case you are out of luck also.  Maybe in that case 
you could write your own keyboard filter driver, but no guarantees.  It 
really is hardware dependent.

-- David


0
dc2983 (3206)
9/11/2008 4:34:47 AM
On Sep 10, 1:58=A0pm, thinktwice <memorial...@gmail.com> wrote:
> laptop could redirect the display output to another device by pressing
> Fn + special key, how could i know this happened? i have searched msdn
> for sometime, hanvn't found any window message related. does anyone
> know ?

You can intercept WM_DEVICECHANGE OR WM_DISPLAYCHANGE window mesasges.
There is the possibility you will get these messages multiple time, in
that case you would need to write your own mechanism to handle
multiple occurances of these messages.

Hope this would help you.

-vishal
0
9/11/2008 7:36:14 AM
Reply:

Similar Artilces:

Event sounds
Just upgraded from MSMoney2005 to 2006. All my event sounds are gone and I haven't been able to find a post about this problem. Are there any known solutions? Fred Fred, Sorry if this sounds too simplistic - but it is a place to start. Check "Tools, Settings, Program Settings, Sounds" and make sure this box is checked and the specific sounds it is looking for with each Event are on your hard drive. > Just upgraded from MSMoney2005 to 2006. All my event sounds are gone and I > haven't been able to find a post about this problem. Are there any known > solu...

Object Events for Object you Created
I do not know if the answer is right infront of me or that it is just not possible! I am using Accsess to create an Internet Explorer object and I want events in the object to trigger functions in my database. Is it even possible? So lets my db app takes a user to the DMV to download a file, and on download complete, I close the object and open the file. Here are the IE events, problem is that I just do not know how to trigger them Coding if I was only smart enough: sub anything click: Set Newsite = CreateObject("InternetExplorer.application") Newsite.Visible = True ...

display row indicator when using scroll bar in excel 2003 #2
Excel 2000 would display the row number as the used the scroll bar to the right of the spreadsheet. Can Excel 2003 be set to duplicate this behavior? Thanks. I use xl2002. When I use the scrollbar in xl2002, I see the display changing. I bet MS thought that if you could actually see the row, you wouldn't need that tip. Scott wrote: > > Excel 2000 would display the row number as the used the scroll bar to the > right of the spreadsheet. Can Excel 2003 be set to duplicate this behavior? > Thanks. -- Dave Peterson ec35720@msn.com ...

Convert Query field display from text to hyperlink
I have a query that draws data from a table that has been imported into Access 2003 from an SEC file of summary company filings. The fields in that imported table are: CIK - and ID field alphanumeric stored as text, e.g. "1375195" Company Name - stored as text FileName - stored as text, e.g. "edgar/data/1375195/0001144204-07-060584.txt" In my query, I'd like to add a field that inserts in front of the FileName the base URL to the Filename so that it becames a clickable hyperlink, e.g. FullFileName "ftp://ftp.sec.gov/edgar/" & FileName gives the res...

CFileDialog listview events
Hi, Does anyone know how to catch the event of changing the list view style (e.g. Thumbnails) ? I have this "hook" function: LRESULT CALLBACK MyHook(int nCode, WPARAM wParam, LPARAM lParam) { TCHAR szClassName[MAX_CHAR]; static HWND hWndListView = NULL; // Persist CWPSTRUCT* x = (CWPSTRUCT*)lParam; GetClassName(x -> hwnd, szClassName, MAX_CHAR); if(strcmp(_strlwr(szClassName), "syslistview32") == 0) { switch(x -> message) { case ??????????: if (x->wParam == ?????????) { .... but I don't know which e...

Pictures burned to DVD or CD, works on computer but not on external device
I had a few pictures saved in png format. I burned them into a CD then a DVD, they played fine. Later I bought a portable 7" DVD player. It won't play the CD and the DVD that I burned. On the CD, it just make a sharp noise, and nothing. On the DVD, it said Unknown Source ( or DVD ). Any solution ? hk129 -- hk129 I'm just guessing here, but its probably because your dvd player is trying to look for a video file Verse to picture files. In other words, you're dvd player does not support the type of files you have burned. Try making a slide show of your pi...

email capture
I'm having a problem with Outlook not pulling the mail off my pop server. When I do a send and receive the mail is identified, "grabs" the messages like it's doing a download but when it reaches the end I'm getting an unknown error message. Any thoughts? 1) First, try to set up Outlook Express to download the email set. Sometimes it has better luck. 2) Another way is to clear the queue manually. This is technical, and not really recommended by anyone, but you may have a stuck message... Telnet to get it... (this method permanently deletes messages before you c...

Displaying Query Results in a Textbox
Hello I am having a problem getting the results of a query to appear in a textbox. Does anyone know how to do this? Thanks JJJJS Please give a few details. -- -Larry- -- <craigalaniz@pobox.com> wrote in message news:1178829331.981143.115990@n59g2000hsh.googlegroups.com... > Hello > > I am having a problem getting the results of a query to appear in a > textbox. > > Does anyone know how to do this? > > Thanks > > JJJJS > ...

Median of Even Set; How to Capture them?
Hi everyone, Say I have a dat set such as: 4 5 6 7 The median is (5+6)/2=5.5! However, I am not interested in the answer here, but the 5 and the 6!!! Is there an excel function or way to do so? Thanks alot, Mike Do you want the output in one single cell or in 2 separate cells? Mike Wrote: > Hi everyone, > > Say I have a dat set such as: > > 4 > 5 > 6 > 7 > > The median is (5+6)/2=5.5! > > However, I am not interested in the answer here, but the 5 and the > 6!!! > > Is there an excel function or way to do so? > > Thanks alot, ...

Capture user selection of font
If I put a font combo box on a Ribbonbar is there a way for me to capture the user's font choice? I need to capture that choice and use it in a macro. Whate *exactly* are you trying to achieve with your macro? -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<> "dplaut"...

Event 1147
Exchange 5.5 SP4 on a Win2K Server SP4 A few days ago, I started getting the following event in my Applications log: Event Type: Error Event Source: MSExchangeIS Private Event Category: Rules Event ID: 1147 Date: 12/16/2003 Time: 3:03:00 AM User: N/A Computer: MXCA1 Description: Error --- while disabling rule on public folder with rule ID 100. The folder ID of the public folder is in the data section of this event. The only KB article I found seemed to be more for Exchange 2000 and didn't really offer any additional information. I'm guessing that this is a "corrupt" pu...

Documents view & print different on two computers
I have a customer that is running MS Office 2000 SP3 on two seperate computers on the same network. They are running Windows XP Professional and have the same network printers with same divers installed. When a document is created on one computer, even though the font and size say they are the same one document will appear thinner and the actual text layout per line is different from the other computer. The same version of Office 2000 SP3 (default srttings) is being used along with same network printer drivers. Any help would be appreciated. Thanks in advance, -rick- -- Te...

assigning Submit behavior (event) to a form under a masterpage scenario
I could not find any specific discussion on this, so please bear with me as I am less experienced programming for the web than I am for the desktop. I have a master page with a <body> tag such as this (as this is part of the default content from the horse's mouth); <body> <form id="form1" runat="server"> <div> <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </div> </form> </body> This MasterPage serves...

cannot find "Exchange Task" in Active Directory Users and Computers console
I have.. 1st AD - W2k 2nd AD - W2k with Exchange 2K. I cannot find "Exchange Task" in Active Directory Users and Computers console of 1st AD or other workstaions with domain admin pak loaded. I can ONLY perform exchange task on 2nd AD with Exchange. It's so inconvenient. What am I missing here? Thanks Calvin you need to install the ESM on the workstation... "Calvin C." <CChang@mjlm.com> wrote in message news:eF1yHJYrEHA.192@tk2msftngp13.phx.gbl... > I have.. > 1st AD - W2k > 2nd AD - W2k with Exchange 2K. > > I cannot find "Exchange ...

Change Data Capture: Preserve capture instance data when adding co
When a new column is added to table that is configured for change data capture (cdc), the capture instance table will not have the new column until cdc is disabled and re-enabled for the source table. In the process the existing capture instance is dropped. I thought I could copy existing data out to a temp table and then copy back using the following SQL. However, other CDC meta information, such as the cdc.change_tables.start_lsn, becomes invalid. How can the capture instance history be preserved, using the same capture instance name, if at all? Thanks, Rich /*...

worksheet prints different on different computer
Hi I have a worksheet that has a section where the user enteres some text. There are about 10 rows and each row has merged cells from a to d . The user enters text on each row....and it's used like a memo so to speak. When I print the worksheet in Excel 2000... I can see all of the data entered in each row... If I send it to someone who uses Excel 97 and they print it.. a few rows of data do not print.. it's blank, What would cause this?? Is there a solution? Any suggestions would be greatly appreicated.. Thanks, Kimberly ...

Any way to catch the event..
Hi. In MFC program, is there any way to catch the event when user terminates program forcibly from task manager? As you know, OnDestory is not called when user terminates program forcibly from task manager... I would like to do someting before the point that user terminates program forcibly from task manager.... Would it be possible to do that? It seems like to me that there is no any message invoking when terminated program forcibly from task manager... Any idea would be great. Thanks in advance. >In MFC program, is there any way to catch the event when >user terminates progra...

Event ID 13008
Am getting quite a few of these. What does this mean? Running Exch 5.5, SP4 with NT 4 SP6a jss1@sgsi.com wrote: > Am getting quite a few of these. What does this mean? > Running Exch 5.5, SP4 with NT 4 SP6a Hi, Google is your friend ... Here's what the ERROR program told me: 0xfffff9bf = -1601 = JET_errRecordNotFound Try running "ESEUTIL /G <db> /V /X >c:\eseutil.log" and see if it reports any problems (especially with Long Values (LV's). If you do detect orphaned LV's have a look at these MS KB's: XADM: How to Detect and Remove Long Values in...

Fatloss computer program
I have been using this computer program for a couple weeks now and i am very pleased with the results so far. its a software fatloss program, if your looking for a diet/weightloss plan i reccomend you check this place out first: http://fatloss9.50webs.com ...

Net Display should refresh even when users are logged out
Net Display freezes on whichever screen is active when a user logs out. It would be desireable for this to continue to rotate through the screens as when a site uses log off automatically after each sale we would like the display to continue to refresh and market our items and services. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-bas...

Capturing date/time modified on a form?
I have a form where staff can go and add student information, I would like to be able to capture when and if the form has been modified. We are running reports on students with certain behaviours right now but we don't know how up-to-date the data is if we don't capture if it's been changed recently. I added TimeModified and DateModified to my main table and put the fields on my form that I need it to capture but I'm not sure how to actually get it to fill those fields once data has been modified, any help would be appreciated. Monique Duane OK, what I've done now...

imap4svc / event id 1023
Good day! I have Exchange 2003 SP1 and Windows 2003 SP1 with latest patches and Symantec Mail Security 4.6. And one of users complains about errors using imap4 (over ssl actually) – he get error … bit after refresh (or after pressing some GetNewMailButton) everything is ok. And he have to do this TwiceClickThing on every new email. On server Application log I can see following error type event: Error 0x8004050a occurred while rendering message 0019-00000114f03f for download for user xxxxxxxxxx@xxxxxxxxxxx.xx. For more information, click http://www.microsoft.com/contentredirect.asp. A...

sharing outlook on networked computers
Is there any software the will allow mulitpule users on the same outlook ? This would be for the entire outlook See http://office.microsoft.com/en-us/assistance/HA011477571033.aspx for an article by Outlook MVP Eric Legault on various ways to share Outlook data. YOu'll also find a list of third-party sharing tools and other information at http://www.slipstick.com/outlook/share.htm. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Tom" &l...

mny file on different computers
I can't seem to copy my .mny file from my desktop to use on my notebook. Using Money 2005 deluxe on both. Money starts and immediately wants to upgrade/convert my .mny file (seems to think its from a different version). If I try to let it do this this it comes back and says it can't open the file, might be read-only or the disk is write protected. I checked permissions and all that. Have plenty of disk space. I have admin priveledges. I've tried restoring a backup file also with same results. Any suggestions? Thanks. In microsoft.public.money, Bill S wrote: >I c...

How can I restrict cell data display to column width?
I would like to print my spreadsheet and restrict the data display to the column width so that no column's empty cells are not covered with wide data in adjacent column cells. Is there a way to do this? (Text control "wrap text" and "shrink to fit" don't work for me.) ...