Window with round corners

Hi,

is there a declare or a hack to get a Xojo Window (Floating Window) with rounded corners on macOS like in Swift’s Autocomplete?

what version of macOS are you using that they’re NOT round ?

OK I found a solution. You have to set the NSWindow Titlebar invisible. Inserting this code into a Xojo Floating Window Open event returns exactly the style you want:

Const AppKit = "AppKit"
Const NSWindowTitleHidden = 1
Const NSFullSizeContentViewWindowMask = 32768

Declare Sub titleVisibility Lib AppKit Selector "setTitleVisibility:" (handle As Ptr, value As Integer)
titleVisibility(Me.Handle, NSWindowTitleHidden)

Declare Sub setStyleMask Lib AppKit Selector "setStyleMask:" (handle As Ptr, value As Integer)
Declare Function styleMask Lib AppKit Selector "styleMask" (handle As Ptr) As Integer
setStyleMAsk(Me.Handle, styleMask(Me.Handle) + NSFullSizeContentViewWindowMask)

Declare Sub titlebarAppearsTransparent Lib AppKit Selector "setTitlebarAppearsTransparent:" (handle As Ptr, value As Boolean)
titleBarAppearsTransparent(Me.Handle, True)

Floating Window