Interactive popup

  • Thread starter Thread starter Maxim
  • Start date Start date
M

Maxim

Hello,


I would like to be able to add an icon in the Start panel, near the
Sound Volume and Network Status icons, and also be able to show an
interactive popup appearing "from" that icon when something happens in
my application. By interactive popup, I mean a popup which can contain
any possible controls, not just text.

How can I do that using NETCF / OpenNETCF ?

Thank you !
 
You can use the OpenNETCF.WindowsCE.Forms.Notification
www.opennetcf.org/sdf/ (or System.WindowsCE.Forms.Notification if you are
using .NETCF v2.0). This supports HTML contents, which can include a basic
HTML Form for which you can capture the result when the message is
dismissed.

Peter
 
Peter Foot [MVP] dit:
You can use the OpenNETCF.WindowsCE.Forms.Notification www.opennetcf.org/sdf/
(or System.WindowsCE.Forms.Notification if you are using .NETCF v2.0). This
supports HTML contents, which can include a basic HTML Form for which you can
capture the result when the message is dismissed.

Hi Peter, thank you for your quick response !


It seems like you are the person who worked on the Notification class.
Please allow me to ask you some questions :

- I'd like to insert a bunch of buttons and URL links in my popup. How
is it possible to know which one was activated ? You say, it is
possible to capture the result when the message is dismissed, how can I
capture it ? And what do you mean by "message is dismissed" ?


- I can't make the notification icon disappear from the Icon bar. Here
is an example of how I proceed:
Notification ntf = new Notification();
ntf.Caption = ...
ntf.Text = ...
ntf.Visible = true;
[... Do something ...]
ntf.Visible = false;

What am I missing ?


- Is it possible to attach the notification to a particular Icon
already inserted in the Icon bar ?


Thank you a lot !
 
Maxim dit:
- I can't make the notification icon disappear from the Icon bar. Here is an
example of how I proceed:
Notification ntf = new Notification();
ntf.Caption = ...
ntf.Text = ...
ntf.Visible = true;
[... Do something ...]
ntf.Visible = false;

What am I missing ?

Oh, in fact it disappears, it all depends on what I put in [... Do
something ...]. I have a MessageBox.Show in there for test purposes,
and it seems to interfere with the Notification system so "ntf.Visible
= false" doesn't remove the Notification icon from the Task bar.
 
Maxim dit:
- I'd like to insert a bunch of buttons and URL links in my popup. How is it
possible to know which one was activated ? You say, it is possible to capture
the result when the message is dismissed, how can I capture it ?

Ok, I got it ! I post here my "solution" so other people can profit:

(...]

Notification ntf = new Notification();

ntf.Caption = "Test";
ntf.Text = "Ok, I got it ! <br><br><form method='POST'><input
type=button value='Close' name='something' ></form>";
ntf.InitialDuration = 5;

ntf.ResponseSubmitted+=new
OpenNETCF.WindowsCE.Forms.ResponseSubmittedEventHandler(ntf_ResponseSubmitted);

[...]

private void ntf_ResponseSubmitted(object sender,
OpenNETCF.WindowsCE.Forms.ResponseSubmittedEventArgs respevent)
{
// respevent.Response should be equal to "something"
label1.Text = "Clicked button's name: " + respevent.Response;
}
 
Back
Top