473,796 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Notification Application

markmcgookin
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;
  2.  
  3. ...
  4.  
  5. Notification note = new Notification()
  6. note.Caption = "Foo";
  7. note.Text = "Bar";
  8. note.Visible = true;
  9.  
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 3318
Plater
7,872 Recognized Expert Expert
Pop it up in a new thread, and have the calling thread wait for a join?

EDIT:
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
markmcgookin
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
Hi,

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
Plater
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;
  2.  
  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. }
  13.  
  14. private void OnResponseSubmitted(object obj, ResponseSubmittedEventArgs resevent)
  15. {
  16.    CanGo=true;
  17. }
  18.  
  19.  
  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. }
  27.  
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

3
2195
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
1
1670
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 !
0
905
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 application) and alert the user. We thought that it may be possible to do it with SQL Notification Services,...
0
1046
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 application) and alert the user. We thought that it may be possible to do it with SQL Notification Services,...
9
4766
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
3
5544
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 via the serial post and waits for events. We have not problem working with the serial port, or...
1
1471
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 anyone have done it before.
0
1631
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 fading. my problem is when ever form is showing, the focus goes to form from current application(any)...
0
1133
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 is visited.
0
9525
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10452
Oralloy
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9050
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7546
isladogs
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6785
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5440
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5569
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.