- // clip region is not correct on win32.
- // use the entire form's area.
- clip = new Rectangle (0, 0, form.Width, form.Height);
- ThemeEngine.Current.DrawManagedWindowDecorations (pe.Graphics, clip, this);
+ if (HasBorders || IsMinimized && !(Form.IsMdiChild && IsMaximized)) {
+ // clip region is not correct on win32.
+ // use the entire form's area.
+ clip = new Rectangle (0, 0, form.Width, form.Height);
+ ThemeEngine.Current.DrawManagedWindowDecorations (pe.Graphics, clip, this);
+ }