Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Thu, 6 Oct 2005 12:26:00 -0700,    group: microsoft.public.dotnet.myservices        back       


Trying to Use ActiveX Control in Service Application   
I have an regular application that I'm trying to replace with a service
equivalent.  The problem I'm running into is that the program has an ActiveX
control that is dropped onto the form, and that I pass to a DLL.  I added a
form to the service application, instantiate the form and reference the
ActiveX control and everything seems fine.  It compiles and installs OK.
However, when I start the service, it gives the following error at the line
in the form where the ActiveX control gets instantiated:

----------------------------------------------------------------------------
-------------
An unhandled exception of type 'System.Threading.ThreadStateException'
occurred in system.windows.forms.dll

Additional information: Could not instantiate ActiveX control
'17738736-8831-4197-aca5-a740a050b4cf' because the current thread is not in
a single-threaded apartment.
----------------------------------------------------------------------------
--------------

How might I work around this problem, or is it even possible?  Thanks.
date: Thu, 6 Oct 2005 12:26:00 -0700   author:   Phil Galey am

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us