Archive for June 17, 2016

SQL Error – SSMS, ‘-120’ is not a valid value for property ‘Width’ or ‘Height’

June 17, 2016 4 comments

Today I came across a weird error as my colleague was trying to open SSMS (SQL Server Management Studio), and it was throwing following error:

‘-120’ is not a valid value for property ‘Width’

… in the dialogue box shown below:

SSMS Width Height issue

… a similar error can also occur for Height also (2nd image).

By checking the error its obvious that there is something wrong with Width or Height of SSMS Query-Editor window.

So, I went to REGEDIT (In RUN, type regedit.exe) and after navigating here n there got the location where to update this property.

Navigate to folder: HKEY_CURRENT_USER\SOFTWARE\Microsoft\SQL Server Management Studio\13.0\

Here check the MainWindow property value (image below), it was showing: 0 451 109 -120 876 1

Change it to a positive value considering the width of your SSMS editor window, I replaced -120 with 1400

SSMS Width Height issue Regedit

Click OK and close the Registry Editor window and re-open SSMS, it will not show this error again !

Categories: SQL Errors Tags: