Set a thread as UI

K

Kevin

Hi!
I've a 3d party component that convert file formats. Sometimes the
convertion blocks the process. I'm trying to solve it runing the convertion
in another thread with a join timeout. But when the convertion method is
called raise the follow error:
InvalidOperationException:
"It is invalid to show a modal dialog or form when the application is not
running in UserInteractive mode. Specify the ServiceNotification or
DefaultDesktopOnly style to display a notification from a service
application"

How can i set Environment.UserInteractive to true in this thread?

Thanks =)
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

I don;t think you can set another thread as the "UI" thread.

Did you check if there is a "silent" mode in the component?

Otherwise you will have to execute it in your UI thread no matter what.

Or of course, you can always can use another control :) , what conversion
are you doing?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top