+
+ private new void UpdateSizeGripVisible ()
+ {
+ // Following link explains when to show size grip:
+ // http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=138687&SiteID=1
+ // if SizeGripStyle.Auto, only shown if form is shown using ShowDialog and is sizable
+ // if SizeGripStyle.Show, only shown if form is sizable
+
+ bool show = false;
+
+ switch (size_grip_style) {
+ case SizeGripStyle.Auto:
+ show = is_modal && (form_border_style == FormBorderStyle.Sizable || form_border_style == FormBorderStyle.SizableToolWindow);
+ break;
+ case SizeGripStyle.Hide:
+ show = false;
+ break;
+ case SizeGripStyle.Show:
+ show = (form_border_style == FormBorderStyle.Sizable || form_border_style == FormBorderStyle.SizableToolWindow);
+ break;
+ }
+
+ if (!show) {
+ if (size_grip != null && size_grip.Visible)
+ size_grip.Visible = false;
+ } else {
+ if (size_grip == null) {
+ size_grip = new SizeGrip (this);
+ size_grip.Virtual = true;
+ size_grip.FillBackground = false;
+ }
+ size_grip.Visible = true;
+ }
+ }
+