Hi,

We have an application which contains numerous ChartFX controls. Basically the user can double click on an existing chart, and it will open a new (modeless) form which contains a new chart.

The problem is that the new window although appearing to be the focussed window isn't, as the user has to click on it twice (one click seems to be passing right through to the parent form) before the window is actually selected.

This wouldnt be such a big problem except that if the user right clicks on the chart we get a "Cannot display context menu on invisible control" error, even though the control is visible.

I guess that basically somehow the modeless dialogue window is not visible to the underlying code, and the events arent firing properly.

I have tried everything I can think of to fix it including calling Select(),Activate(),BringToFront() etc on the new window but none of them make any difference. I have even triggered mouse events on the new window to try to focus it automatically.

I am pretty much desparate to make this work so Can anyone please help me?

Thanks,

David

--------------------------------
From: David Brooks

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>OnD6s6O1MEaz/WOzww1bkA==</Id>

Re: Modeless Form visibible but inivisible PLEASE PLEASE HELP by Francisco

Francisco
Thu May 19 10:18:16 CDT 2005

When you call the second form, do you do it in the MouseDown event ?

If so that might be the problem as the MouseUp will not reach the control.

You should move you code that opens the form to the MouseUp event or
DoubleClick event.

--
Francisco Padron
www.chartfx.com