Application on Background

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to run an application on the background, and avoid the spinning cursor display

This is what I am trying to do
I have a dll that instanciated an exe when ActiveSync attemps to Sync. The exe check for files on the Web and downloads and updates some files on the PocketPC. If a files is downloaded an icon is added to the task bar
The user can then click on the icon to launch the application that displays the new updated files

So far I have two problems
1. The spinning cursor appears when the application is updating the new files
2. I have not figured out how to keep the application (with out user interface) running on the background so it can listen to the icon click event. Right now it adds the icon to the task bar and then exist which in turns automatically removes the icon from the task bar

Any ideas? Is this the wrong way to go about this? It works pretty good, but I have to be able to hide the process from the user. The only notification that something is going on is on ActiveSync which shows that the program is checking for new files on the net and then the icon which shows that indeed new file where found, downloaded and are now available

Thank you
 
It is not possible to rid yourself of the spinning cursor entirely in V1 of
the .NET Compact Framework. However, if you want to get rid of it as soon
as possible call Application.DoEvents(); at the beginning of your main
function.

My understanding of the way the notification icon click event works is that
you need to have a windows message loop running. In order to do that,
perhaps you could construct an off-screen form and just use the normal
Application.Run to keep your app running until you close your off-screen
form. In order to place the form off-screen, you will need to set the
BorderStyle to BorderStyle.None, and then give the form a bounds in
negative screen space. myform.Bounds = new Rectangle(-1128, -2873, 0, 0);
Those numbers are just made up, feel free to use others.

David Wrighton
..NET Compact Framework

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Thread-Topic: Application on Background
| thread-index: AcQWyaAHmDuBzPO8R6ePKAtxr+QsMQ==
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
| From: "=?Utf-8?B?Zmh1bnRlcg==?=" <[email protected]>
| Subject: Application on Background
| Date: Tue, 30 Mar 2004 18:41:10 -0800
| Lines: 18
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:49945
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Is there a way to run an application on the background, and avoid the
spinning cursor display?

This is what I am trying to do:
I have a dll that instanciated an exe when ActiveSync attemps to Sync. The
exe check for files on the Web and downloads and updates some files on the
PocketPC. If a files is downloaded an icon is added to the task bar.
The user can then click on the icon to launch the application that displays
the new updated files.

So far I have two problems:
1. The spinning cursor appears when the application is updating the new
files.
2. I have not figured out how to keep the application (with out user
interface) running on the background so it can listen to the icon click
event. Right now it adds the icon to the task bar and then exist which in
turns automatically removes the icon from the task bar.

Any ideas? Is this the wrong way to go about this? It works pretty good,
but I have to be able to hide the process from the user. The only
notification that something is going on is on ActiveSync which shows that
the program is checking for new files on the net and then the icon which
shows that indeed new file where found, downloaded and are now available !

Thank you





|
 
David
Thanks so much for your response. I am bagging my self against the wall on this one. Isn't there an elegant way to run a procress on the background? With out any Windows, or with out the top bar showing that the application is running
The application I am working with is lauched using CeRunAppAtEvent from another app. Could I possible run a .dll instead of an exe? How could this be done
I need this process to run as tranparently as possible to the user. And remain on untill the icon is clicked and I shut down the app
Anyone else have any ideas?
 
Back
Top