Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 2 of 2

VS2005 upgrade of VB app with MP control fails with GPF "ActiveX Ctrl...not in a STA"

This is a discussion on VS2005 upgrade of VB app with MP control fails with GPF "ActiveX Ctrl...not in a STA" within the MapPoint Desktop Discussion forums, part of the Map Forums category; After converting a VS2003 VB Winform control to VS2005 which has a MapPoint control embedded in it I am now ...

  1. #1
    ANDYL is offline Junior Member White Belt
    Join Date
    Oct 2006
    Posts
    4

    Angry VS2005 upgrade of VB app with MP control fails with GPF "ActiveX Ctrl...not in a STA"

    After converting a VS2003 VB Winform control to VS2005 which has a MapPoint control embedded in it I am now getting runtime exception

    "ActiveX control '8f78d7fc-bae4-46a4-a79a-052356ab3dd4' cannot be instantiated because the current thread is not in a single-threaded apartment.".

    My app contains a Windows.Forms.UserControl class with MapPoint control embedded on it and a test form I use to develop and debug the UserControl. I tried tagging the Sub Main with <STA...> attribute as per MSDN article with no success.

    When I embed the usercontrol in my ASPX page it just crashes the page.

    This usercontrol is intended to be accessed embedded in an ASP.NET page via IE7.

    I'm stuck.

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: VS2005 upgrade of VB app with MP control fails with GPF "ActiveX Ctrl...not in a

    Hi,

    You cannot access GUI components from another thread than the main thread. It never been, but in earlyer dotNet versions there was no exception generated.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. MapPoint control "My ActiveX, program is not responding
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 06-24-2009, 02:39 PM
  2. ActiveX control fails in VS2005, but was fine in VS2003
    By jtowell in forum MapPoint Desktop Discussion
    Replies: 7
    Last Post: 11-23-2006, 03:42 PM
  3. MapPoint 2004 Active-X control: how to "bump" pus
    By citrix_99301 in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 03-18-2006, 03:50 AM
  4. ActiveX Control -- problem overriding "DragBehavior&quo
    By scotty in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 02-14-2005, 05:20 PM
  5. Do I need "Autoroute Europe", if I install "M
    By bigtail in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-24-2004, 12:58 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25