Thanks for the reply Chris, although i'm not totally sure what more i can
say to explain the problem.
It's opening a new thread with this line of code:
timedSyncThread = new OpenNETCF.Threading.ThreadEx(new
ThreadStart(this.SetSyncTime));
timedSyncThread.Start();
and it does that every 5 minutes.
on the closing event of my application it attempts to close that thread but
the application just doesn't re-open until i soft-reset.
What could be causing that?
Many Thanks,
Rob
"Chris Tacke, eMVP" wrote:
> I don't see the thread side of this? How does it receive the notice to end
> and then exit itself?
>
> --
> Chris Tacke
> Co-founder
> OpenNETCF.org
> Are you using the SDF? Let's do a case study.
> Email us at d c s @ o p e n n e t c f . c o m
> http://www.opennetcf.org/donate
>
>
> "Rob S" <(E-Mail Removed)> wrote in message
> news:B6017C82-DC29-4D57-BF96-(E-Mail Removed)...
> > Hi there,
> >
> > Have an issue with my .NET application.
> >
> > Basically the problem is it runs fine the first time and then when i close
> > it (from settings > memory) it no longer starts when i click on the icon,
> > literally does nothing.
> >
> > This started happening after i'm now using notifications to run a specific
> > thread every 5 minutes.
> >
> > In my form_closing event i run this code:
> >
> >
> > if ( timedSyncThread != null )
> > {
> > EventWaitHandle notifyEvent = new OpenNETCF.Threading.EventWaitHandle(
> > false,
> > OpenNETCF.Threading.EventResetMode.AutoReset,
> > "SAMS_SYNC_EVENT" );
> >
> > // Notify the thread to stop.
> > notifyEvent.Set();
> >
> > notifyEvent.Close();
> >
> > ..but i still have this problem.
> >
> > Any ideas?
> >
> > PS. Works fine again after a soft reset.
> >
>
>
>