Select to view content in your preferred language

Control accessed from a thread other than the thread it was created on

959
1
02-16-2011 09:54 AM
kyleknoche
Emerging Contributor
Hi -

I've got an application that was written for ArcEngine using vs2005/.net 2.  I've migrated the code to 3.5.  I'm now getting an error during the InitializeComponent method in the constructor of the main form saying that i'm trying to access my axMapMain control outside of the thread it was created on.

The error is happening on

  ((System.ComponentModel.ISupportInitialize)(this.axMapMain)).EndInit();

axMapMain is a customControl that inherits from MapControl. 

I know my AO but have not worked with Engine until now.

Any help is appreciated.

thanks,
kyle
0 Kudos
1 Reply
kyleknoche
Emerging Contributor
I forgot to mention : my machine is 64bit.  I don't know if that is the problem but i know that if I don't set the build to x86 when I build a brand new ArcEngine app with a MapControl on it that it bugs out (different error) on that same line.

Very confusing.
0 Kudos