how to make a form always look focused

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Greetings,

I have an application which uses multiple forms, but with one being the
"main" display form. I would like the main form to always have the appearance
of being focused. How can this be achieved? I do not want to make that main
form actually be always focused, because the secondary forms need to read
input.

Thanks
 
Hello MKin,
I have an application which uses multiple forms, but with one being the
"main" display form. I would like the main form to always have the
appearance
of being focused. How can this be achieved? I do not want to make that main
form actually be always focused, because the secondary forms need to read
input.

I don't know if and how this is possible and I really don't want to think
about it - just want to warn that from a usability standpoint this is a
horrible idea. The mechanism of providing visual focus feedback is there
for a reason and shouldn't be tampered with, IMHO.


Oliver Sturm
 
Hi Oliver,

Actually, because of the way the application is built, the secondary forms
are made to look like a side panel to the main form - and secondary forms may
only be shown one at a time. Doing it this way allows the title bar to be
present over only the main form, but to have other controls show up
"external" to the main one. It's kind of a neat effect. But knowing this, you
can see how having the main form lose focus may make the rest of the
application look "funny" when one of the secondary forms gain focus.

Any other recommendations for implementation to gain the same interface
would also be appreciated.

Thanks,

MK
 
Hello MKin,
Any other recommendations for implementation to gain the same interface
would also be appreciated.

I admit I can't really imagine what that interface would look like - or at
least my imagination doesn't make it look very nice :-) Do you know of
another application that does this? Any screen shots?


Oliver Sturm
 
Hello MKin,
If you are familiar with Apple's OS, the effect I'm going for is that of
the
"drawer" control. I can't think of any near equivalent in Windows, or any
other similar effects.

So why are you trying to reproduce it? It belongs in another world and
Windows users are not going to be familiar with it.

Btw, and possibly incidentally, the only thing I find in Google when
searching for "apple os drawer" is an article titled "The Mac OS X Drawer:
A Badly Designed User Interface Element" - here:
http://www.mcelhearn.com/article.php?story=20041116135640496

Anyway, from my point of view there's no point in continuing this
discussion. I was trying to make the point that non-standard UI behaviour
like what you're trying to achieve is not a good thing from a usability
perspective, and the fact that we're talking about a UI element that can
otherwise only be found on Macs supports my point. In my opinion you
should reconsider your plans for UI design, and probably save a lot of
time in the process.


Oliver Sturm
 
Hello MKin,
With that said, I suppose if I shouldn't do this look and feel, my next
inquiry is this: if I have two forms open at once (and they cannot be
modal),
how can I be sure that if one of those forms is selected after the
application loses foreground focus that both forms return to the
foreground?

You should be fine by just calling BringToFront() on the "other" windows
that you want to bring to the front together with the one that has
actually just been activated by the user. I guess it might require some
tweaking so you don't get into a bring-to-front loop, but it should work...


Oliver Sturm
 
Back
Top