Install Screen.WorkingArea.Width?

Sorry if this is a fundamental question and I'm just stupid :)

I am creating a sidebar application, it uses System.Windows.Forms.Screen.PrimaryScreen.WorkingArea to set the appropriate width and height and location.

Now I want to reduce the workspace of the desktop so that with maximum formatting, the sidebar still shows up (just like the Vista or Google sidebars) ... but it tries to set the width in the workspace .Width gives me the error that WorkArea (System.Drawing.Rectangle) is not a property.

What can I do to change the width of the workspace to prevent overlapping forms on the sidebar? Thanks in advance!

+3
source share
1 answer

In fact, looking at this in more detail, it looks like it is much more involved and requires Win32 API calls to complete the job and get the same behavior.

This link contains sample code on how to do this. (Sorry, its ExpertExchange, so scroll down, but this is a complete sample.)

0
source

Source: https://habr.com/ru/post/1730475/


All Articles