G
Guest
Hi,
I have an application running on a PocketPC written in
C#. The app collects information from the user and also
does database connections periodically with a seperate
background thread. I'm hoping to display the status of
this background thread
(IE: "Connecting", "Downloading", "Disconnected") to the
user via a statusBar.
To keep the background thread and user-interface threads
seperate, I have a 'Status' property in the background
thread that I would like the UI to occasionally check.
To try it out, I created a System.Threading.Timer in the
UI (Form1) thread and had it run an 'Update' function
that changes the statusBar.Text property to the current
time. Unfortunately, this seemed to partially freeze the
application. I put a MessageBox before the
statusbar.text update and found that the function
continues to be called but the thread stops when it hits
the statusBar property.
I tried the same code in a non pocketPC environment (just
a regular C# application for winxp) and it works fine.
I was wondering what's up with the PocketPC UI threading
that would make it behave this way.
Any help much appreciated.
I have an application running on a PocketPC written in
C#. The app collects information from the user and also
does database connections periodically with a seperate
background thread. I'm hoping to display the status of
this background thread
(IE: "Connecting", "Downloading", "Disconnected") to the
user via a statusBar.
To keep the background thread and user-interface threads
seperate, I have a 'Status' property in the background
thread that I would like the UI to occasionally check.
To try it out, I created a System.Threading.Timer in the
UI (Form1) thread and had it run an 'Update' function
that changes the statusBar.Text property to the current
time. Unfortunately, this seemed to partially freeze the
application. I put a MessageBox before the
statusbar.text update and found that the function
continues to be called but the thread stops when it hits
the statusBar property.
I tried the same code in a non pocketPC environment (just
a regular C# application for winxp) and it works fine.
I was wondering what's up with the PocketPC UI threading
that would make it behave this way.
Any help much appreciated.