I've been searching for this, but can't find a solution, except on expert-exchange.com [here]. Sadly this is a website where you have to pay for your answer and I'm not willing to do that.
Now, onto explaining my problem: I'm creating a toolbar for Windows, which should not be overlapped by applications, so it should shrink the working area. (Just like the taskbar, which is outside of the portion of the screen where all other applications are.)
It is quite simple to get the size and position of the working area, using Screen.PrimaryScreen.WorkingArea, but this a read-only property, so this function can't be used to change the working area.
What code/function(s) can I use to set the working area?
Thanks for your help,
arsmakman.
No matter how fool-proof your program is, there will always be a better fool.
I think you could use an appbar.
Though it looks complicated. There's a brief c# example here.
The appbar is a standard toolbar managed by windows, so windows will handle the docking, and ensure it is not obscured.
@ jo0ls: I really am trying to find a way to shrink the working area. I know it is possible, I have actually done it before, in VB6.0, but this was done by the so-called 'Screen Class' which is integrated in .NET as the Screen object, but there it is read-only.
@ sparrow1: That search returns only references to the Screen- and System Information-classes, which contain read-only properties only. So, I can get the work area with those, but I can't set it with them.
Last edited by arsmakman; Jun 17th, 2006 at 05:14 AM.
No matter how fool-proof your program is, there will always be a better fool.
I got it working but couldn't add any controls. I then found that they need to be added before you register the appbar. You also need to make sure it isn't registering as an appbar in design mode, or setting the create params in design mode. Also make sure you unregister when your bar closes, and whenever an error is thrown. It behaves just like the taskbar, if you resize it, the desktop will rearrange icons to fit in the remaining space.
90% of the time, if you just scroll down, you will get the answer, without having to sign up... just see if you can scroll down and see responses from people. (like I do for the link you posted)
also, if that doesn't work, (assuming that you found the page in the first place from a google search) try to view a google cached version of the page, often times, you will get a cached page returned that has the responses posted in it...
I've been searching for this, but can't find a solution, except on expert-exchange.com [here]. Sadly this is a website where you have to pay for your answer and I'm not willing to do that.
That site catches a lot of folks out, but if you scroll down the page you will find the replies underneath the ads, you don't actually have to pay the membership.