popup dialog on CE 5.0

  • Thread starter Thread starter Jay
  • Start date Start date
J

Jay

I have a web app that is constantly listening to "Instant messages" in the
background.

Call it Messenger.aspx.



When it does receive a message, I need to pop up that message and that
window should be appearing on top of all the other apps that are currently
running.

(say popupdialog). E.g: If I am in the Outlook app, readying my emails - I
need the popupdialog to appear to me on the Outlook app.

Messenger.aspx should display a window, popupdialog (with yes/no buttons).

All this should happen on the PDA device. running CE 5.0.



1. I am trying to use showModelessDialog function in the javascript. That
sometimes it appears in the front and sometimes it is in the background.

Is there any reliable way to display a dialog box, that will always appear
on top of the other active windows?

2. Even if the above works, it only works on the desktop. It doesn't show up
on my PDA.



Any thoughts on how we can implement this?
 
So, your question is two-fold, right? Why can't I display dialogs on the
PDA and, if I could, how do I construct my code so that they are top-most
(which is the key word you're looking for, I think), on the screen.

I'm not an expert on Windows CE JScript 5.5, but my belief is that JScript
on Windows CE cannot open new windows on the machine, so I think you're out
of luck. Take a look at the window.alert method of JScript in the
reference.

Paul T.
 
The alert() method in JScript pops up the window, but that appears ONLY when
I am in the browser.
If I have another app open on my screen, the alert just sits in the
background. I would never know that I got the popup box, unless I focus on
the browser window.

I am willing to look at other alternatives - anything that will let me popup
a window and appears on top of every other app that is active.


"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:%23xE5zJU%[email protected]...
 
There are too many ways to list. You're posting in a .NET Compact Framework
group, so I presume that you're willing to write code to run on the device.
If that's the case, build a .NET CF application that embeds the Web browser
in its main window (you can look at the OpenNETCF Smart Device Framework for
a Web browser wrapper for .NETCF, www.opennetcf.org). Then use a Web
service as the pipeline between the application and the server's instant
messaging notification. Run the IM stuff in a second thread in your .NET CF
application and, when a notification is necessary, send an event to the UI
thread for the application and have it do a SetForegroundWindow() and,
potentially, set the top-most window style for the notification window. I'm
sure that you can make this work, but you have to deploy an application to
every device, so it's not as nice as using the built-in browser.

You might also be able to have an ActiveX control on the PDA which the code
can send a message to when the IM arrives causing the browser to come to
the front with SetForegroundWindow() (ActiveX must be written in native code
with C++ on Windows CE). Again, deploy to every device, although you can do
it more easily over the Web itself. This is a simpler version of this
alternative: download an ActiveX control to each PDA that will use the
service and embed it in your PDA version of the Web application. It would
then register for and receive notification of IMs somehow. It can create a
MessageBox() (you're back in native code for this option), and make that
top-most to notify the user.

Another alternative which fits into the OS a little better is to use native
code and ActiveX, probably, but to call CeSetUserNotificationEx() to set up
a user notification to fire on the occurrence of a named event. The ActiveX
would then create an event by that name and, when it finds out that there's
an IM, fires that event, causing the notification to fire, popping up a
dialog, vibrating, repeating the notification, etc. (just as a calendar
notification does).

So, there you go. One that I'm sure will work and several that sound
plausible.

Paul T.

Jay said:
The alert() method in JScript pops up the window, but that appears ONLY
when I am in the browser.
If I have another app open on my screen, the alert just sits in the
background. I would never know that I got the popup box, unless I focus on
the browser window.

I am willing to look at other alternatives - anything that will let me
popup a window and appears on top of every other app that is active.


"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:%23xE5zJU%[email protected]...
So, your question is two-fold, right? Why can't I display dialogs on the
PDA and, if I could, how do I construct my code so that they are top-most
(which is the key word you're looking for, I think), on the screen.

I'm not an expert on Windows CE JScript 5.5, but my belief is that
JScript on Windows CE cannot open new windows on the machine, so I think
you're out of luck. Take a look at the window.alert method of JScript in
the reference.

Paul T.
 
I'd create an ActiveX Control that the page creates and uses.


--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--


Jay said:
The alert() method in JScript pops up the window, but that appears ONLY
when I am in the browser.
If I have another app open on my screen, the alert just sits in the
background. I would never know that I got the popup box, unless I focus on
the browser window.

I am willing to look at other alternatives - anything that will let me
popup a window and appears on top of every other app that is active.


"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:%23xE5zJU%[email protected]...
So, your question is two-fold, right? Why can't I display dialogs on the
PDA and, if I could, how do I construct my code so that they are top-most
(which is the key word you're looking for, I think), on the screen.

I'm not an expert on Windows CE JScript 5.5, but my belief is that
JScript on Windows CE cannot open new windows on the machine, so I think
you're out of luck. Take a look at the window.alert method of JScript in
the reference.

Paul T.
 
Back
Top