.NET Framework - Menu while showing Notification
Asked By Thomas
24-Jan-07 01:48 PM
Hello CF Programmers out there!
I am using Notification balloons
(Microsoft.WindowsCE.Forms.Notification) to show state changes within
my Application. When the Notification shows up, the Menu bar changes
during the notification is shown. This menu has only one Item called
something like "hide". I am wondering where this menu is came from and
if I can add other Items (like Close) to it.
When my PDA receives a Short Message (SMS), it also pops up in a
ballon, but this Balloon has more Menu Items (like "Close", "Close as
read", "Delete", etc..). I also want to add a "Close" Button for my
Notification, because the solution with a button inside the HTML does
not work well for me.
Does anybody know how to access or extend the Menu when a Notification
is shown?
Thanks and Greets
Thomas
Application
(1)
Balloon
(1)
Button
(1)
Delete
(1)
srharton replied...
See if this link helps:
http://msdn2.microsoft.com/en-us/library/microsoft.windowsce.forms.notification.aspx
(for CF2)
Simon.
Thomas replied...
Hello
I've seen the MSDN Description of Notification class, but there is no
information about this issue. The response submitted is only fired when
i place a button inside the HTML form. I was looking for controlling or
accessing the menu while showing the Notification.
Could anybody help?
Thanks,
Tom
yoat4 replied...
[Bump]
Has a resolution to this been found? I'm afraid I'm going to have to
use the native API to handle this unless someone has some advice.
Does anyone know of a way to simply stop the Hide menu from
appearing? I can change the menu myself in the OnBalloonChanged event
handler but it's only visible briefly before the "Hide" menu clobbers
my menu. Does anyone know if this default Hide menu can be ignored or
overwritten?
Thanks,
-Matt Senne
Oxcar replied...
I am pretty sure the managed Notification control does not allow you to
build your own menuItems. With the manged version, you will need to embedd
HTML controls and use the ResponseSubmitted event.
Matt....you say you were able to add your own menuItem but it gets covered
by the "Hide" item? Did you create a menuItem1 object (the left softKey)? If
that it what you did, the left softKey (menuItem1) is not going to fire if
you click the "hide" item. I think the "Hide" sends a cmd:2 to the
Notification control and the ResponseSubmitted does not get triggered in this
case.
Anyway, if someone smarter or better looking than me knows of a way to
create menuItems for the managed control I would like to hear about it. It
will save us from mucking around in the API.
Ox
Theo Chakkapark replied...
Any new developments on this notification issue? it is totally abysmal
that this feature was never included in the managed control.
srharton replied...
No not really. I will be writing a wrapper soon as we need the functionality
the new WM5 API offers.
See here for the new SHNOTIFCIATIONDATA structure it contains a few new
fields SOFTKEYMENU, SOFTKEYNOTIFY within the union and a couple others:
http://msdn2.microsoft.com/en-us/library/aa455987.aspx
The old structure is defined here:
http://msdn2.microsoft.com/en-us/library/aa458065.aspx
I will post on my blog when I have written it.
--
Simon Hart
http://srhartone.blogspot.com
Theo Chakkapark replied...
Any new developments on this so far?
srharton replied...
No, I have not had time to look at this for the last month or so.
--
Simon Hart
http://simonrhart.blogspot.com
c.edward replied...
I have the same issues as everyone here. Has anyone done anything on
this? If not I suppose I will have to do it myself :)

problem with NotifyIcon.ShowBalloonTip, but not the problem commonly found. Most people complain that the balloon shows up too long (even though this is by design. . . I've done that reading the problem I'm having is the icon is disappearing too quickly. Even in an application that all I have is a Form, NotifyIcon and Button, when the Button_Click action is set for notifyIcon1.ShowBalloonTip(30000, "Title", "Text", ToolTipIcon.None); The seconds should be the minimum timeout. Am I missing something? -Steve C# Discussions Timeout (1) Button (1) Win32 (1) From the documentation: "Minimum and maximum timeout values are enforced by the enforced. For more details, you'll likely need to delve into the details of the balloon tip control in Win32. - - J. Is your notifyIcon on a Form? Are you hiding the problem with NotifyIcon.ShowBalloonTip, but not the problem commonly found. Most people complain that the balloon shows up too long
a way to create a .NET form or control from a window outside my own application (I know the handle of the window). The desktop way would be to simply call control what you do next. . . Paul T. I have a small popup window in my application that I would like to make a child of the startbar. I believe if I pop up window of some sort associated with the taskbar, right? What about a notification balloon associated with an icon in the system tray? This breaks through the process barrier and the start bar on the first image, you will see a small popup window (cum button) (aka picker window) to the right of the title "MDict". This popup can be freely hWndChild, IntPtr hWndNewParent); } Once this has been done, you should be able to add a button click event handler or something similiar to invoke the code to add your custom window is being attached as a child to the navbar. (I have noticed another app (Magic Button) has also attached itself there, so it seems it is not such an uncommon practice). Another problem has arisen though. I would like my application, to sit on top of all the other children on the navbar. The MDict dictionary is being attached as a child to the navbar. (I have noticed another app (Magic Button) has also attached itself there, so it seems it is not such an uncommon practice
found something like this: http: / / tinyurl.com / 38f4vc It works but - - / / instead of the normal Application.Run(new Form1); we must manually display the form Form1 formInstance = new Form1(); formInstance.Visible Set the LPARAM to 0 to disable, 1 to enable. Peter - - Peter Foot Microsoft Device Application Development MVP www.peterfoot.net | www.inthehand.com In The Hand Ltd - .NET Solutions for MVP] napisa³(a): I have a problem with this. I simply put a WebBrowser and button component on a form and add this code to Button onClick event: IntPtr handle = webbrowser1.Handle; const int WM_CLOSE = 0x10; const int WM_USER = 0x0400; const MVP] napisa³(a): I have a problem with this. I simply put a WebBrowser and button component on a form and add this code to Button onClick event: IntPtr handle = webbrowser1.Handle; const int WM_CLOSE = 0x10; const int WM_USER = 0x0400; const Remote Spy and i see that WebBrowser on my Form look like this: Form1 (my application with embedded webbrowser) - <no name> #NETCF_AGL_CONTAINER - <no name> (IExplore) -<no name> (MSPIE Status) -<no name If you hit the allow the user to break out of my Kiosk mode type application. What I finally wound up doing was to add a timer to the form that
public NoActivateForm() { TopMost = true; Text = "No Activate Form"; for (int i = 0; i < 10; i++) { Button button = new Button(); button.Text = "0"; button.Click + = new EventHandler(Button_Click); button.Top = button.Height * i; Controls.Add(button); } } void Button_Click(object sender, EventArgs e) { ((Button)sender).Text = (int.Parse(((Button)sender).Text) + 1