Results 1 to 9 of 9

Thread: [02/03] Setting working area?

  1. #1

    Thread Starter
    Fanatic Member arsmakman's Avatar
    Join Date
    Dec 2001
    Location
    Leiden, Netherlands.
    Posts
    719

    [02/03] Setting working area?

    Hello everybody,

    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.

    Was a post helpful to you? Rate it!

  2. #2
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    297

    Re: [02/03] Setting working area?

    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.

  3. #3
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: [02/03] Setting working area?

    Hi,

    Here's a link about how to use the Working Area.
    You could find some good explanation about this thread;

    http://search.msdn.microsoft.com/sea...y=working+area

    Hope it helps,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  4. #4

    Thread Starter
    Fanatic Member arsmakman's Avatar
    Join Date
    Dec 2001
    Location
    Leiden, Netherlands.
    Posts
    719

    Re: [02/03] Setting working area?

    @ 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.

    Was a post helpful to you? Rate it!

  5. #5

    Thread Starter
    Fanatic Member arsmakman's Avatar
    Join Date
    Dec 2001
    Location
    Leiden, Netherlands.
    Posts
    719

    Re: [02/03] Setting working area?

    I've tried figuring out the 'appbar', but it's incredibly complicated and can't get it to work at all.

    So I'm still trying to find a solution...
    No matter how fool-proof your program is, there will always be a better fool.

    Was a post helpful to you? Rate it!

  6. #6
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    297

    Re: [02/03] Setting working area?

    Hmm, complicated...

    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.
    Attached Files Attached Files

  7. #7
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [02/03] Setting working area?

    just an FYI about the expert-exchange..

    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...

  8. #8
    PowerPoster SuperSparks's Avatar
    Join Date
    May 2003
    Location
    London, England
    Posts
    265

    Re: [02/03] Setting working area?

    Quote Originally Posted by arsmakman
    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.
    Nick.

  9. #9

    Thread Starter
    Fanatic Member arsmakman's Avatar
    Join Date
    Dec 2001
    Location
    Leiden, Netherlands.
    Posts
    719

    Re: [02/03] Setting working area?

    Thanks all. I will look more into this appbar a bit later.

    Now I'm playing with my newly arrived VB .NET 2005. It looks very cool.
    No matter how fool-proof your program is, there will always be a better fool.

    Was a post helpful to you? Rate it!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width