Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8306053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:15:10+00:00 2026-06-08T18:15:10+00:00

I am developing WinForms MDI app in VS2010 (.NET 4.0) and I just hate

  • 0

I am developing WinForms MDI app in VS2010 (.NET 4.0) and I just hate 3D border in MDI parent form.

So any ideas on how to remove it (make it flat or just no border it all) ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T18:15:11+00:00Added an answer on June 8, 2026 at 6:15 pm

    I know this is an old post but I have spent some time and pain working the 3D border stuff out (because I needed it too) from fragments across the internet including:

    Elements from Jacob Slusser’s page at codeproject.com (Accessed 1st Aug’12)

    So here goes:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Runtime.InteropServices;
    
    namespace MDITest
    {
        public static class MDIClientSupport
        {
            [DllImport("user32.dll")]
            private static extern int GetWindowLong(IntPtr hWnd, int nIndex);
    
            [DllImport("user32.dll")]
            private static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
    
            [DllImport("user32.dll", ExactSpelling = true)]
            private static extern int SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);
    
            private const int GWL_EXSTYLE = -20;
            private const int WS_EX_CLIENTEDGE = 0x200;
            private const uint SWP_NOSIZE = 0x0001;
            private const uint SWP_NOMOVE = 0x0002;
            private const uint SWP_NOZORDER = 0x0004;
            private const uint SWP_NOREDRAW = 0x0008;
            private const uint SWP_NOACTIVATE = 0x0010;
            private const uint SWP_FRAMECHANGED = 0x0020;
            private const uint SWP_SHOWWINDOW = 0x0040;
            private const uint SWP_HIDEWINDOW = 0x0080;
            private const uint SWP_NOCOPYBITS = 0x0100;
            private const uint SWP_NOOWNERZORDER = 0x0200;
            private const uint SWP_NOSENDCHANGING = 0x0400;
    
            public static bool SetBevel(this Form form, bool show)
            {
                foreach (Control c in form.Controls)
                {
                    MdiClient client = c as MdiClient;
                    if (client != null)
                    {
                        int windowLong = GetWindowLong(c.Handle, GWL_EXSTYLE);
    
                        if (show)
                        {
                            windowLong |= WS_EX_CLIENTEDGE;
                        }
                        else
                        {
                            windowLong &= ~WS_EX_CLIENTEDGE;
                        }
    
                        SetWindowLong(c.Handle, GWL_EXSTYLE, windowLong);
    
                        // Update the non-client area.
                        SetWindowPos(client.Handle, IntPtr.Zero, 0, 0, 0, 0,
                            SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
                            SWP_NOOWNERZORDER | SWP_FRAMECHANGED);
    
                        return true;
                    }
                }
                return false;
            }
    
        }
    }
    

    In the form load event call:

    form.SetBevel(false);
    

    Don’t forget to change the namespace and remember this is an extension method but it could be changed to be just a method call in another class or in you MDI parent form.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a WinForms app in VB.NET, that handles sets of style data, and
I am developing a WinForms app using .NET 2.0 and am trying to use
I am developing a C# WinForms app on my XP dev machine with Visual
I have a winforms (VB 2008) based app that I'm developing and I want
I'm developing a .NET application that will have both a WinForms and a Silverlight
After developing ASP.NET apps exclusively for several years I'm about to start developing Winforms
I am developing a winforms application using .NET 2.0 and Sql Server 2005. I
I'm developing an application (winforms C# .NET 4.0) where I access a lookup functionality
I am developing an app using WinForms and the RichTextBox control. This control allows
I'm developing a C#/.NET application (Winforms/WPF, not entirely decided yet) which needs to display

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.