I have 2 forms (Parent & child). i want to keep both on top (Not topMost). The next fragment work's but the parent not firing any event. I found this "Click Event Not Firing - Cannot Change Focus - Cannot Close Form" althouhg this did not work.
The next fragment works for keep forms but parent doesn't not work:
public FormMain()
{
InitializeComponent();
this.Activated += FormMain_Activated;
}
private void FormMain_Activated(object sender, EventArgs e)
{
ChildForm.Activate();
}
I tried focus the parent form on "GotFocus" and "Activated" althought this doesn't work.
Note: For child form i have this fragment:
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
// turn on WS_EX_TOOLWINDOW style bit
cp.ExStyle |= 0x80;
return cp;
}
}