Previous Thread:   Is it possible to develop app for Windows Mobile 2005 using Visual Studio.NET 2003 and Windows Mobile 2005 SDK?

1/10/2006 10:55:51 PM    Re: the remote connection to the device has been lost
I was suffering exactly same behaviour when doing synchronization the  
  
server with Merge Replication.  
  
I think my problem dissapeared when I deleted  
  
replicationManager.Dispose(), which was not being used in the correct  
  
way. I also was using a static variable for replicationManager, which I  
  
deleted because I didn't need that to be static.  
  
Be careful also when using Application.DoEvents(). I also used it in  
  
the code that was breaking, and I still use it ;-)  
  
I've seen in this group that it's not very good to manually force the  
  
environment to process all messages in the queue.  
  
I thougth this error was an environment error or an installation error,  
  
but I finally modified somehow my code and noticed could be because of  
  
a critical coding error.  
  
That's all I can tell you. Hope it helps.



1/11/2006 11:49:16 AM    the remote connection to the device has been lost
Hello list,  
  
I have a problem with my application....  
  
my program just closes, the debugger disconnects and the IDE comes up with  
  
this message "The remote connection to the device has been lost"  
  
The problem doesnt only happen with debugging, but if I deploy my app with a  
  
debug config or even release config and run it by itself (without the IDE)  
  
the program still closes... no exceptions are thrown the app just closes...  
  
very frustrating  
  
it closes on the line Application.DoEvents().  
  
Before this line is called, im connecting to a database and run count(*) on  
  
about 10 tables. my code then starts to create an xml document and also sets  
  
a progressbar form control value to 0 and maximum to 0.  
  
I have tried reconnecting my device, restarting the IDE and also rebooting  
  
my computer...Still no luck....  
  
My Project is hooked up to visual source safe... (i dont know if the means  
  
anything)  
  
My app was working fine and then all of a sudden, this started happeneing  
  
and I just cant figure out why..  
  
Could anyone assist me please....  
  
thanks  
  
Kind Regards  
  
Nathan

1/12/2006 2:37:28 PM    Re: the remote connection to the device has been lost
The line i actually found it to be erroring on was  
  
ProgressBar1.Maximum = 0  
  
It would work fine up until the next occurance of Application.DoEvents()  
  
Note: ProgressBar.value = 0 before the ProgressBar.Maximum = 0 is called....  
  
But I have just taken out the max call if it = 0, but the thing is I'm  
  
pretty sure it used to work....  
  
Can someone maybe shed some light as to what might be happening?  
  
Thanks heaps  
  
Nath  
  
"Nathan Franklin" <nathan@tsn.cc> wrote in message  
  
news:dq1kne$nvj$1@news-02.connect.com.au...