mcneel / rhinocommon

RhinoCommon is the .NET SDK for Rhino5 / Grasshopper
http://wiki.mcneel.com/developer/rhinocommon
242 stars 93 forks source link

Add InitialMainWindowBounds() #63

Closed golsby closed 12 years ago

golsby commented 12 years ago

Add: System.Drawing.Rectangle Rhino.ApplicationSettings.AppearanceSettings.InitialMainWindowBounds get-only property to RhinoCommon.

The information exists in the Windows registry under: HKEY_CURRENT_USER\Software\McNeel\Rhinoceros[platform][scheme]\Window Positions\MainFrame

where [platform] can be: "5.0", "5.0-Developer-Debug", "5.0x64", "5.0x64-Developer-Debug" and perhaps a few others

golsby commented 12 years ago

RR91753 depends on this issue.

golsby commented 12 years ago

Erg, that's RR87188

sbaer commented 12 years ago

The function is called InitialMainWindowState and returns both the rectangle and initial window state in case the window is maximized. You'll still need to check monitor rects (use System.Windows.Forms.Screen class for this) to ensure the rectangle actually exists for the user's current monitor setup