C#, Tool Windows and focus issues

M

Markus Bauer

Hello,

I am writing a special version of a paint program using c# and the .Net
Framework 2.0.
So I have multiple Windows with the FormBorderStyle FixedToolWindow, one
windows as a main editor window with the default border style and now i
want them to look like they had all the focus at the same time, the way
programs like Paint.Net do behave.

The reason for that is that it irritates me when I see the editor window
loose focus. This happen of cause when I click on some buttons in one of
the tool windows.

I guess it could be achieved by telling the windows, they should not
apply the "unfocused" look and just keep the focus look when lossing
focus with some mystik send window message or stuff like that. ;-)

I was talking to other programmers and they had ideas like changing the
colors so that a non-focussed windows look like a focussed window or
that the toolbox windows would not have any title at all and that i use
a picturebox to paint my own title but all these ideas look like
workarounds to me with some drawbacks i would not like to take.

I tried to google an answer but i did not find any. Sure there will be
one, I guess i just do not find the right words for the search :(.

Any help is appreciated

Markus Bauer
 
M

Markus Bauer

OK found a solution by sending the WM_NCACTIVATE Message to the window
itself when the Deactivate Event occurs. The magic key for finding the
solution was searching for activate instead of focus ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top