Hi Arcer
It seems that you are right and it appears that the .NET Framework is caching the working screen size at application startup so if you change the working area after your application has been loaded (i.e. by increasing the size of the taskbar or adding the office shortcut bar etc.), Screen.PrimaryScreen.WorkingArea still returns the original cached size. I would suggest that this behaviour is probably a bug in the framework
A workaround would be to p/invoke the 'SystemParametersInfo' Win32 API which will get you the working area in realtime..
\
Private Const SPI_GETWORKAREA As Integer = 4
Private Structure REC
Public Left As Intege
Public Top As Intege
Public Right As Intege
Public Bottom As Intege
End Structur
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA"
(ByVal uAction As Integer, ByVal uParam As Integer, ByRef lpvParam As RECT, ByVal fuWinIni As Integer) As Intege
//
\
Dim rectDesktop As REC
If (SystemParametersInfo(SPI_GETWORKAREA, 0, rectDesktop, 0) <> 0) The
Console.WriteLine("Desktop Working Width = " & CType(rectDesktop.Right - rectDesktop.Left, String)
Console.WriteLine("Desktop Working Height = " & CType(rectDesktop.Bottom - rectDesktop.Top, String)
End I
//
HTH
Gary