Notifications and a running app

  • Thread starter Thread starter Karsten Baumann
  • Start date Start date
K

Karsten Baumann

Hello NG,

I want to program an application (VB .NET), which starts in specific
intervals and display notifications. Then the program should be ended.
The app starts with CeRunAppAtTime and shows a notification with a
Microsoft.WindowsCE.Forms.Notification. So far so good.

The problem is, when the user does not close the notification. The app is
already running and does not show another notification.
Which event shows me, when a application is activated???

Karsten
 
So, what you want to do is to keep the application running, or that's the
problem? You could set up a timer so that, if the user doesn't dismiss the
notification in 15 seconds, say, it dismisses itself and the application
closes, if you want the application to always close.

Paul T.
 
The message tells the user that in the night a sms was sent and call the
function CeRunAppAtTime to start the app on the following day. If the
program is running that does not work...

Karsten
 
Yes, that's as-intended. What's the problem? That 1) the program is still
running and you want to know how to stop it (see my previous message), or 2)
you want it to be able to still be running and to handle that?

If 2), then you need to make two CeRunAppAtTime calls, one to run the
application, in case it is not still running, and one to trigger a named
event which the application will create. The application needs to set a
thread to wait on the event, for that case.

Paul T.
 
Hello,

can you give me a short example, please? I dont know, how I have to code
this...

Karsten
 
Hello,

I have found a sample for a named event
(http://msdn.microsoft.com/en-us/netframework/bb870451.aspx). The problem
is, that the code works only on a english device . On my german device the
event not raise.

I think, that the path for named events on my german PocketPC (WinMo 6.1)
not right:
Const _timeOfDayEventName As String = "\\.\Notifications\NamedEvents\" &
_eventName

Can you help me?

Karsten
 
You've checked the event name in the debugger and verified that it appears
right? I posted another message earlier that hasn't appeared yet, but I
can't find any sign that the event prefix \\.\Notifications\NamedEvents\ is
localized at all. I can't explain why German would make any difference.

Assuming that's true, look at what, eactly, you're doing on the assumption
that it's wrong, in some way. You're asking for your event to be set on some
occurrence that never happens, that happens repeatedly and you're not using
an AutoReset event, that will happen, but not for days, etc.

Paul T.
 
Back
Top