R
Rob Whiteside
Hi,
I am trying to bring a secondary window over top of my main form. The
goal is for it to act as a transparent canvas that I can custom paint
some objects to. This seems like the best method for painting on top
of other controls.
So, there are a few issues I need to overcome. The first is that this
new "window" can't take focus from the main form. I don't want the
user to really know that there's another "window" open.
The second is that the transparent portions of this "window" need to
be click-through. That is, the mouse should be able to interact with
the main form where the top "window" is transparent.
I have attacked it from two angles. I can open another form and set
things like transparencykey to make the click-through works. but this
new form steals the focus from main form when you click on the custom
painted objects.
The other angle is from an example I found online, where you
essentially make a user control show as a window. This allows me to
use WS_EX_NOACTIVATE to prevent the "window" from getting focus, but
now I can't set a transparencykey that let's me click through the
"window" to the main form below.
Each tactic solves one problem, but not the other. Any suggestions?
Put simply, can I bring up a form without it ever taking focus from
the other form, or can i show a Control as a window but allow the
transparent parts to be click through?
Thanks for the help!
--Rob
I am trying to bring a secondary window over top of my main form. The
goal is for it to act as a transparent canvas that I can custom paint
some objects to. This seems like the best method for painting on top
of other controls.
So, there are a few issues I need to overcome. The first is that this
new "window" can't take focus from the main form. I don't want the
user to really know that there's another "window" open.
The second is that the transparent portions of this "window" need to
be click-through. That is, the mouse should be able to interact with
the main form where the top "window" is transparent.
I have attacked it from two angles. I can open another form and set
things like transparencykey to make the click-through works. but this
new form steals the focus from main form when you click on the custom
painted objects.
The other angle is from an example I found online, where you
essentially make a user control show as a window. This allows me to
use WS_EX_NOACTIVATE to prevent the "window" from getting focus, but
now I can't set a transparencykey that let's me click through the
"window" to the main form below.
Each tactic solves one problem, but not the other. Any suggestions?
Put simply, can I bring up a form without it ever taking focus from
the other form, or can i show a Control as a window but allow the
transparent parts to be click through?
Thanks for the help!
--Rob