Two Desktop applications problem

  • Thread starter Thread starter LearnMore.John
  • Start date Start date
L

LearnMore.John

I have two Windows Desktop applications App1 and App2.
App1 is invoking Appp2 using Reflection.
When App2 application opens a Modal window, App1 Application also
freezes
I dont want to happen this, how can i avoid this.

Sample code how i am invoking App2 from App1

Assembly a;
a = Assembly.LoadFrom(installDir + @"\App2 .exe");
object[] args = new object[3];
args[0] = ideWSPath
args[1] = this.Size;
args[2] = this.Location;
Instance = a.CreateInstance("App2.frmMain", false,
BindingFlags.CreateInstance, null, args, null, null);
((System.Windows.Forms.Form)nstance).Show();

thanks in advance
 
Is there any reason you're opening App2 that way instead of using the
System.Diagnostics.Process class?
 
You should show the form in a different thread. An async delegate might
be a good candidate.
 
I need to close and open App2 application if there is a change in the
state of App1..

if i open App2 using Process, i guess i will not be having any control
over App2 ( just in case if i want to call some methods of App2)
 
Back
Top