Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 120827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:52:23+00:00 2026-05-11T03:52:23+00:00

I have a a C# (FFx 3.5) application that loads DLLs as plug-ins. These

  • 0

I have a a C# (FFx 3.5) application that loads DLLs as plug-ins. These plug-ins are loaded in separate AppDomains (for lots of good reasons, and this architecture cannot change). This is all well and good.

I now have a requirement to show a Dialog from one of those plug-ins. Bear in mind that I cannot return the dialog Form to the main application and have it displayed there (the current infrastructure doesn’t support it).

Failure 1

In my DLL I created a Form and called Show. The dialog outline showed up but did not paint and it doesn’t respond to mouse events. I assumed that this is becasue the DLL is in a separate AppDomain and the message pump for the app is somehow unable to dispatch messages to the new Form.

Failure 2

In my DLL I created a Form and called ShowDialog, which by all rights should create an internal message pump for the dialog.. The dialog is displayed and responded to clicks (hooray), but it appears that the primary app no longer is processing or dispatching windows messages because it quits painting and no longer responds to mouse events. For some reason now it seems that the main app’s message pump is not dispatching.

Failure 3

In my DLL I created a Form and called Application.Run. This will certainly create a complete second message pump. I get the same behavior as Failure 2 – the Dialog behaves, but the calling app does not.

Any thoughts on what exactly is going on here and how I might go about showing a dialog from the other AppDomain’s DLL and have both the caller and the callee still respond and paint properly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T03:52:23+00:00Added an answer on May 11, 2026 at 3:52 am

    Try using appdomain1’s main form’s BeginInvoke with a delegate that displays the form from appdomain2. So in Pseudocode:

    Appdomain1:     AppDomain2.DoSomething(myMainForm);  AppDomain2:     DoSomething(Form parent)     {         Form foolishForm = new Form();         parent.BeginInvoke(new Action( delegate { foolishForm.Show(); } ));     } 

    The code may not be perfect, but it demonstrates the concept.

    By the way, if you are having problems passing forms around because of remoting you can:

    public class Container<T> : MarshalByRefObject {     private T _value;     public T Value { get { return _value; } set { _value = value; } }      public Container() { }     public Container(T value) { Value = value; }      public static implicit operator T(Container<T> container)     {         return container.Value;     } } 

    That will contain object you throw at it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 123k
  • Answers 123k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I've used the following code without problem to draw text… May 12, 2026 at 1:06 am
  • Editorial Team
    Editorial Team added an answer Qt is moving in this direction, with CSS-like styling and… May 12, 2026 at 1:06 am
  • Editorial Team
    Editorial Team added an answer Unclear if you want to exclude Nurses that work with… May 12, 2026 at 1:06 am

Related Questions

I have a .NET UserControl (FFX 3.5). This control contains several child Controls -
I have a C library that needs a callback function to be registered to
I'm writing a a C# program that processes and forwards email messages. I have
I have a C++ DLL with code like this: LogMessage( Hello world ); try

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.