Ballon tooltip

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I understand i can use the UserNotification class for raising a reminder
dialog box.

However, all i really need is a tooltip to appear that let's the user know
something has happens and sits in the titlebar until they click OK (although
program will continue running)

Is that possible?

Thanks
 
You can use the balloon notifications API from .NETCF - for v2.0 Beta see
Microsoft.WindowsCE.Forms.Notification - create a new notification object,
set it's caption with some basic HTML, define a timeout as required then set
visible true. You can hook the events of this object to determine when it is
dismissed or times out.
For .NETCF v1.0 see the wrapper which closely resembles the v2.0 version in
the SDF (www.opennetcf.org/sdf/) - OpenNETCF.WindowsCE.Forms.Notification

Peter
 
Hi Peter, thanks for the reply.

I'm attempting to use OpenNETCF.WindowsCE.Forms.Notification, however i'm
getting a TypeLoadException from the below code:

OpenNETCF.WindowsCE.Forms.Notification not = new
OpenNETCF.WindowsCE.Forms.Notification();
not.Caption = "New Jobs";
not.Text = "You have new jobs";
not.Visible = true;

Any ideas why?

Thanks
 
Right ok, sorted... i have it working.

Just a couple of question though:

1) I can raise the notification, however you the little icon in the title
bar, can i just show it and then delete it from there?

2) If i do keep on there you click and the blank bar appears undernearth,
are there suppose to be icons or something in there?

3) How do i close the notifcation by clicking a button inside the balloon?

My code below:

OpenNETCF.WindowsCE.Forms.Notification not = new
OpenNETCF.WindowsCE.Forms.Notification();
not.Caption = "New Jobs";
not.InitialDuration = 5;
not.Text = "You have new jobs<br><br><input type=button value='Close'>";
not.Visible = true;

Thanks!
 
By default the balloon will use the 16x16 icon from your executable.
otherwise it will be blank. You can also set the icon manually with the
IconHandle property - it's less than ideal but theres no way to get the
hIcon from an Icon object in .NETCF v1.0 directly. If you create a single
icon it will normally be added to the titlebar, however once this area gets
a certain number of icons, they will be replaced with an "icon tray" which
will open below the titlebar and contain "overflowing" icons.
You'll need to handle the BalloonChanged event to be notified when the
bubble is dismissed, you can then set the visible property to false to
remove the icon from the tray.

Peter

--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://www.peterfoot.net |
http://www.opennetcf.org
 
Back
Top