I've got this C# code below working fine. It removes an external apps border title and control boxes.
What I'd really like to do is change the border style to SingleFixed.

Any help appreciated.

        Process[] Procs = Process.GetProcesses();
        foreach (Process proc in Procs)
        {
            if (proc.ProcessName.StartsWith("notepad"))
            {
                IntPtr pFoundWindow = proc.MainWindowHandle;
                int style = GetWindowLong(pFoundWindow, GWL_STYLE);

                //get menu
                IntPtr HMENU = GetMenu(proc.MainWindowHandle);
                //get item count
                int count = GetMenuItemCount(HMENU);
                //loop & remove
                for (int i = 0; i < count; i++)
                    RemoveMenu(HMENU, 0, (MF_BYPOSITION | MF_REMOVE));

                //force a redraw
                DrawMenuBar(proc.MainWindowHandle);
                SetWindowLong(pFoundWindow, GWL_STYLE, (style & ~WS_SYSMENU)); 
                SetWindowLong(pFoundWindow, GWL_STYLE, (style & ~WS_CAPTION));
                //SetWindowLong(pFoundWindow, GWL_STYLE, (style & ~WS_???????)); 
            } 
        }

These constants are defined in WinUser.h
You probably need to remove WS_THICKFRAME.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.