Remove Window Border Completely

Is there anyway to completely remove a Window object's border If I set the Window.WindowStyle = WindowStyle.None, there is still a "border" around the window which is rather annoying.

Thank you,

Jaco



Answer this question

Remove Window Border Completely

  • angrycoder2

    I am having another issue with all this. I am making a custom-draw window in which I manage all the border drawing and window resizing, etc.

    So to achieve removing the "standard" window border, I set WindowStyle.None. This of course leaves a bevelled border in XP. It seems that setting either AllowsTransparency=True or ResizeMode=NoResize will get rid of that bevelled border.

    Now here is the problem... I can't set AllowsTransparency to true because that prevents Windows Forms controls from being visible in the Window (see this post: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=572863&SiteID=1). I can't set ResizeMode=NoResize either because if you do that then right clicking on the taskbar will not give you Maximize/Minimize/etc. options, which I do still need since my window is resizable (via my own handling).

    Anyone have any idea how to get rid of that border without using either AllowsTransparency or ResizeMode

    Thanks,



  • Matthew Mitrik MSFT

    You can set ResizeMode to NoResize and that should get rid of the border.

  • Todd Potter

    Thank you very much!
  • Dmitriy Nikonov MSFT

    It might be a Windows XP issue. I don't have a Vista machine to check but both CanResizeWithGrip, and CanResize have the same result in XP and I see no grip. However, there is a CanMinimize so you can at least enable that Bill. Why there isn't another enum option for CanMaximize I have no idea.

  • Remove Window Border Completely