I am currently working on forms in Enterprise Architect using C# add-ins. I am not using form.ShowDialog() because it had previously led to not-responding state of Enterprise Architect.
The backend process is Enterprise Architect which has to kept as parent to the current form which works on using form.Show() but the problem is when the form is exited with form.close(),EA is also getting minimized.
Kindly help me to display and close form such that EA will not get minimized after form close. Thanks in advance.
class CreateContentsForForm
{
ModifyForm()
{
Form newForm=new Form();
//adding contents to form
//display form
var proc = Process.GetProcesses().Where(x => x.ProcessName == "EA").First();
IWin32Window w = Control.FromHandle(proc.MainWindowHandle);
Form.Show(w);
Application.Run();//this is added for navigating through datagridview using tab key in form
}
}