473,553 Members | 2,852 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Notification Application

648 Recognized Expert Contributor
Has anyone used the notification class from Windows CE forms?

using the following code

Expand|Select|Wrap|Line Numbers
  1. using Microsoft.WindowsCE.Forms;
  3. ...
  5. Notification note = new Notification()
  6. note.Caption = "Foo";
  7. note.Text = "Bar";
  8. note.Visible = true;
I can display a "Toast" pop up notification on screen for a user. From a forms app... that's as easy as it gets, just pop up the noteification and that's it. However I don't want to launch a form. I want to do this from a console app... which, in theory, is fine. As the app can just reference the microsoft.windo wsce.forms.dll and that's fine. However, the app fires up the notification, then continues, thus closing the application in about a second, and causing the notification to disappear.

I really want to launch the notification as a dialog. So, like a dialog box, the application would keep paused on the code until the user closes the notification then continuing and killing the app.

Any ideas? I've been tearing my hair out with this one. I tried making a forms application and then hiding the form, but that just doesn't work as the app always displays the form, even if you use Form.hide() or Form.Visible = false. I have tried importing coredll.dll and using the findWindow() and then trying to close the form with that as well and it didn't work. Surely there must be a way to run it like it was a dialog?

At the minute I have resorted to a dialog box, as this does the job, but I would much rather notify the user with a toast style notification pop up.
May 27 '09 #1
4 3306
7,872 Recognized Expert Expert
Pop it up in a new thread, and have the calling thread wait for a join?

Did you set the InitialDuration property?
Perhaps have your console code that calls this object also listen to its disposed() event and tell the calling code to halt until that event has been triggered?
May 27 '09 #2
648 Recognized Expert Contributor
Yeah, I have the initial duration set. Anything less than 10 seems to be ignored but that works.

I tried the new thread thing, but it seemed to have the same result. When the application exited, I think it killed all threads it started. I dont use multi threading much, so maybe I screwed up, but I thought creating a new thread would have kept running after the app exits.

I'll post back asap and chuck in all my code... I am happy for everyone to see it, as this is just a "simple" app that I'd love help with and I think would be useful to people in the future.
May 29 '09 #3
Young Indian
4 New Member

Try this. Create Form Application. Set the Enabled property of the form to false in the design time. Then in the Form_Activated event set the form's visible property to false. I think it works.

Also Note : (if its a Windows Mobile App)

If you have the Menu property of the form set to mainmenu1, there will be a flickering in the bottom. So set the Menu property to (none) in the design time. When you are displaying the form, you can set the menu property again.
May 30 '09 #4
7,872 Recognized Expert Expert
MSDN says about Notification "This class is supported only on the Pocket PC." Not sure if that is up to date though.

Ok here's my untested stub suggestion
Expand|Select|Wrap|Line Numbers
  1. private static CanGo=false;
  3. private void PopupToast()
  4. {
  5.    CanGo=false;
  6.    Notification note = new Notification();
  7.    note.Caption = "Foo"; 
  8.    note.Text = "Bar"; 
  9.    note.Visible = true; 
  10.    note.ResponseSubmitted += new ResponseSubmittedEventHandler(OnResponseSubmitted);
  11.    //You may need to handle the BalloonChanged event as well? or disposed?
  12. }
  14. private void OnResponseSubmitted(object obj, ResponseSubmittedEventArgs resevent)
  15. {
  16.    CanGo=true;
  17. }
  20. //somewhere in your code
  21. PopupToast();
  22. while(!CanGo)
  23. {
  24.    Application.DoEvents();//allow the threads to continue(does this work for command line programs?)
  25.    //maybe do a wait for a few seconds to not be a busy loop?
  26. }
The idea is that your code sits and waits for SOMETHING to change that boolean value.
I recomend having that while() loop also check DateTime to see if it has been waiting for "too long" and can thus break out of the loop.
Jun 1 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Ray | last post by:
Does anyone know if there is a notification broadcast, or alternatively a message that can be sent to the system, that would inform me that a web camera attached to the local computer was in use, or not? Thanks, Ray
by: Hai Ly Hoang [MT00KSTN] | last post by:
Different between Notification & Message is a bit hazy for me. Anyone can explain in detail for me ? Thanks in advance !
by: Sezgin Rafed | last post by:
Hi everyone, I wonder if it is possible to integrate a ASP.NET Web Application running on IIS 6.0 with SQL Notification Services. Having the ASP.NET Web Application running(user on client machine connected with IE), if data is inserted into a certain table we want the ASP.NET Web Application to detect it(or get alerted by another...
by: Sezgin Rafed | last post by:
Hi everyone, I wonder if it is possible to integrate a ASP.NET Web Application running on IIS 6.0 with SQL Notification Services. Having the ASP.NET Web Application running(user on client machine connected with IE), if data is inserted into a certain table we want the ASP.NET Web Application to detect it(or get alerted by another...
by: Marty | last post by:
Hi, I have an application bound to a database through ADO.NET, how can it be notified when the database content is updated by a third party ? If you have any idea or link that I could read I would very appreciate. If ADO.NET is not the solution, with which engine can this be done? Thank you, Marty
by: geskerrett | last post by:
We have been asked to develop and application for a client that is a 'notification" system. We would like to use python, but are struggling to find the right starting point. Any suggestions, tips or sample code would be appreciated. Application outline; Machine A is running a "listener" application that is connected to a another device...
by: -pb- | last post by:
Hi, Is it possible to develop a web service which can send asyncronous notification to the client application using Web Service and not the Remoting? What I really want to know that, if each client application have a web service which gets the notification from server web service (on some task running on server). Is this possible? Does...
by: vsrprasad16 | last post by:
Hi All, I am implementing a notification form similar to outlook email notification. my application call this notification form from a dll. this dll includes a form class and this dll has some object value to display the contents on form. i am filling the form with the object before "form.show." form has some timer to implement hide and...
by: DevScar | last post by:
I need to show a notification when the user goes to a particular URL. Our application is going to sit in the task bar. When he visits a particular page in our site a notification should pop-up which will launch our windows application. It is assuming that the user has already installed our windows application. So how to check if that URL...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.