Compass control error.

Aug 7, 2009 at 12:19 AM

I am porting the sample from GPS.net 2.0 to 3.0. when I use the Compass, I got an exception blew.

System.NotSupportedException: Control.Invoke must be used to interact with controls created on a separeate thread.
at
Microsoft.AGL.Common.MISC.HandleAr(PAL_ERRORar)
at
System.Windows.Forms.Control.get_Visible()
at
GeoFramework.Drawing.DoubleBufferedControl.Repaint
at
GeoFramework.Drawing.DoubleBufferedControl.Repaint

How can I use compass control and the other controls on CF.net 3.5

Aug 7, 2009 at 12:24 AM

I got it.

 

compass1.IsPaintingOnSeparateThread = false;

 

But how can I use the controls in multi threading environment?

 

 

Aug 8, 2009 at 2:44 PM

Jakelin,

Could you show the rest of us numpties how you got it working?

i.e. how to detect a gps device; retrieve latitude/longitude data etc...

I can't get anything out of it but you seem to have it working (a bit at least).

Thanks

 

 

Aug 10, 2009 at 12:51 AM

nibbo,

I make some functionalities working now. good on  jperson, You can download the GPS diagnostic demo to try or let me know your email, I will send you the demo I wrote.


I still keep trying the controls, I think I will solve them out recently. What I do is I will dip into the source code jperson provides. thanks jperson again.

Aug 10, 2009 at 4:56 AM

Thanks for the reply jakelin but I can't find the demo anywhere.

Could supply a link please?

 

Aug 12, 2009 at 3:20 AM

nibbo,

check out here please.

http://gpsdiagnostics.codeplex.com/

Aug 20, 2009 at 9:02 PM

Hello, it's me or that link it's not working anymore?