Rounded Corners on Windows App

Hello,

Is there an example of getting round corners on a DesktopWindow frame for Windows? Like shown in the blog post: WinUI and A Box of Shadowy Changes – Xojo Programming Blog

I’ve tried Shadowed Box style and the other styles, but once I set “Has Title Bar” to false, I get a square window. I don’t have any controls in the window. This is an empty project.

Has anyone gotten round corners? Do I need to use some Declares?

Thanks!

OK, I think I found it. You need to use Shadowed Box style, but leave "Has Title Bar set to True. That seems like strange behavior to me because the window doesn’t appear to have a title bar in Shadowed Box style.

2 Likes

Are you running on real hardware, or a VM? I run Win-11 in a VirtualBox VM under macOS, which insisted on giving me rectangular windows. Supposedly this was because the VM would have an emulated graphics processor, which wouldn’t be able to draw the rounded corners quickly enough. However, the same article included a suggested registry entry, which, when applied, gave me the rounded corners.

This is on a real machine. I get the desired effect with “Shadowed Box” style and leaving “Has Title Bar” set to true. I guess I don’t understand the effect of Has Title Bar. The documentation makes it sound like it only effects the actual title bar, not the window frame.

OK, there is a problem with using Shadowed Box style. It can’t be minimized. That’s a non-starter for me. So I’m back to needing to figure out how to get Document style windows round corners.