I use the Screen object to get the working area of the desktop (i.e. minus the task bar).
I would like to be able to get updated values if the user moves the taskbar, adds another desktop bar object, etc. while the program is running.
However, as the documentation says: "The constructor for this object is not public, so you cannot explicitly create a Screen object. The object is created when you call its public methods."
So if I call get Screen.WorkingArea, then resize the taskbar and get the value again, it doesn't change!
Is there any way to force this kind of object to be disposed of and recreated?
It has no Dispose method.
This isn't a critical feature for my program or anything because it isn't terribly likely to happen, but I like to cover my bases. And I've gotton sorta curious if its possible.
I would like to be able to get updated values if the user moves the taskbar, adds another desktop bar object, etc. while the program is running.
However, as the documentation says: "The constructor for this object is not public, so you cannot explicitly create a Screen object. The object is created when you call its public methods."
So if I call get Screen.WorkingArea, then resize the taskbar and get the value again, it doesn't change!
Is there any way to force this kind of object to be disposed of and recreated?
It has no Dispose method.
This isn't a critical feature for my program or anything because it isn't terribly likely to happen, but I like to cover my bases. And I've gotton sorta curious if its possible.