task bar dialogues..undetectable?

Hi,
i have an app i wrote which can intercept the hardware keys and do something. One of the "something" i would like to do is close dialogues when a certain key is pressed. How can i do this?

by "dialogues", i mean modal forms AND the bubble notification dialogue that appear to be related to the top Taskbar..

i know how to find a window by it's class, and i know how to send a WM_CLOSE message. i also have a key handler class that can handle the hardware keys "globally" (meaning it doesn't matter what app i am in, i detect when a key is pressed)...

my problem is, i can't seem to detect when one of those notification dialogues pop up nor can i find them once they are up. I am using GetActiveWindow API to try and get a handle to the active window, but it doesn't seem to work. I could try FindWindow, but i do not know the Window Class name for these dialogues (and my Remote Spy does not want to connect to either my device or the emulators..that's another issue all together).

anyone know how to detect them?

[1058 byte] By [farseer] at [2007-12-16]
# 1
There is no supported way of doing what you want to do. You may be able to achieve the desired result with a FindWindow with some specific classname, but the classname you are searching for can/will vary between versions of the PocketPC/Smartphone OS.

David Wrighton

DavidWrighton at 2007-9-9 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...