asked on Removing the title bar from a floating window - General - Xojo Forum
no answer
for macOS in the open event (maybe the constructor as well) of a window
#If TargetMacOS
Dim newStyle As UInt32 = 0 //no titlebar, not resizeable
Soft Declare Sub setStyleMask Lib "Cocoa.framework" selector "setStyleMask:" (id As Ptr, mask As UInt32)
setStyleMask(Ptr(Self.Handle), newStyle)
the masks are in NSWindow.h
typedef NS_OPTIONS(NSUInteger, NSWindowStyleMask) {
NSWindowStyleMaskBorderless = 0,
NSWindowStyleMaskTitled = 1 << 0,
NSWindowStyleMaskClosable = 1 << 1,
NSWindowStyleMaskMiniaturizable = 1 << 2,
NSWindowStyleMaskResizable = 1 << 3,
/* Specifies a window with textured background. Textured windows generally don't draw a top border line under the titlebar/toolbar. To get that line, use the NSUnifiedTitleAndToolbarWindowMask mask.
*/
NSWindowStyleMaskTexturedBackground API_DEPRECATED("Textured window style should no longer be used", macos(10.2, 11.0)) = 1 << 8,
/* Specifies a window whose titlebar and toolbar have a unified look - that is, a continuous background. Under the titlebar and toolbar a horizontal separator line will appear.
*/
NSWindowStyleMaskUnifiedTitleAndToolbar = 1 << 12,
/* When set, the window will appear full screen. This mask is automatically toggled when toggleFullScreen: is called.
*/
NSWindowStyleMaskFullScreen API_AVAILABLE(macos(10.7)) = 1 << 14,
/* If set, the contentView will consume the full size of the window; it can be combined with other window style masks, but is only respected for windows with a titlebar.
Utilizing this mask opts-in to layer-backing. Utilize the contentLayoutRect or auto-layout contentLayoutGuide to layout views underneath the titlebar/toolbar area.
*/
NSWindowStyleMaskFullSizeContentView API_AVAILABLE(macos(10.10)) = 1 << 15,
/* The following are only applicable for NSPanel (or a subclass thereof)
*/
NSWindowStyleMaskUtilityWindow = 1 << 4,
NSWindowStyleMaskDocModalWindow = 1 << 6,
NSWindowStyleMaskNonactivatingPanel = 1 << 7, // Specifies that a panel that does not activate the owning application
NSWindowStyleMaskHUDWindow API_AVAILABLE(macos(10.6)) = 1 << 13 // Specifies a heads up display panel
};