Change Desktop Max Window Size

J

Jordi Rico

Hi,

it's difficult for me trying to explain what I need to do, as English
is not my main language.

I'm building an application which will consist of a single form. This
single form must be always visible (TopMost = true), and placed just
above the Task Bar (all the PCs where our application will be
installed will be running XP), with a height of about 2 or 3 "Task
Bars".

The problem is, when the user wants to maximize any other application
(IE, Firefox, Office, etc.), the bottom part of this application will
hide behind our application. What we want to do is change the max size
any window can resize when the user clicks on "Maximize".

I've searched everywhere, but can't find anything useful. I've tried P/
Invoke to hook global events to capture the resize event of the
windows with no luck, as the only valid examples I find is to hook
mouse or keyboard events, but not window resizing events. In one case
I found one example code which in theory managed resizing events, but
after trying it, it only hooked windows created from my application.

If you know any way to solve this, I'll appreciate your help.

PD: If the way of doing this is changing a value in Windows Registry,
wouldn't be a problem as we have direct access to all the PCs running
this application.
 
J

Jeff Johnson

I'm building an application which will consist of a single form. This
single form must be always visible (TopMost = true), and placed just
above the Task Bar (all the PCs where our application will be
installed will be running XP), with a height of about 2 or 3 "Task
Bars".

Do a Google search for the term "AppBar".
 
J

Jordi Rico

[...]
The problem is, when the user wants to maximize any other application
(IE, Firefox, Office, etc.), the bottom part of this application will
hide behind our application. What we want to do is change the max size
any window can resize when the user clicks on "Maximize".

Your question has absolutely nothing whatsoever to do with C#.  This is
just not the right place to ask it.

But since you have, I'll ask you: what other software have you seen that
does this?

I haven't seen any.  I would immediately uninstall any program that I
did see do this.

Top-most windows should be used sparingly and only when you can actually
justify obscuring some other window.  Just as important is to realize
that there is no way to guarantee your "top-most" window is really the
"top-most top-most" window.  Some other programmer could have their own
justification for wanting their program to be "top-most", and their
program could win the z-order lottery.

If you feel that obscuring the underlying windows of other applications
isn't appropriate, then you should probably rethink your use of top-most
here.  Frankly, as a user I would be even more irritated by a program
that arbitrarily reduces the screen space available to other
applications than I would by a program that inappropriately designates
its windows as top-most.

Pete

I understand you, and think the same as you, but it's not an
application intended to be distributed, but for a closed group of
users who know what is being installed. Is my customer who wants this
top most window form in his PCs and in the context where he wants
this, it makes sense...
 

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