Window with no title bar and round corners

Is it possible to make a windows with round corners for MacOS and Windows?

Preferably without plugins.

At least on MacOS the round corners are gone as soon as I hide the title bar.

On macOS you can make the window background completely transparent and then draw the shape you want…

Sub Opening() Handles Opening
  Self.HasTitleBar = False
  Self.BackgroundColor = Color.Clear
  Self.HasBackgroundColor = True
End Sub

Sub Paint(g As Graphics, areas() As Rect) Handles Paint
  g.DrawingColor = Color.FillColor
  g.FillRoundRectangle(0.0, 0.0, g.Width, g.Height, 100.0, 100.0)
End Sub

For Windows there’s already a Xojo-provided example at:

Examples/Platforms/Desktop/Windows/Creating a Custom Window Shape with Declares

3 Likes

That’s clever; I never thought of trying that!

I learned it a few months ago from @RudolfJ in this thread.

My advice is going to be a little dated because I’m not on Tahoe, but if you mean a window like the Lifeboat Server list window, I can help. Just give me a shout.

Hello Travis

it can also be shown in other ways

zickzack-Window.xojo_binary_project.zip (5.9 KB)