Remove the shadow of a window

Hello guys,

Is there any way I can remove the shadow of a window ?
I’m making a new application and I am leaving a round windows with transparent background, and the shadow is done, I wanted a more “Flat” visual.

Any help is welcome, Tanks !

Put this in the windows Open event.

declare sub hasShadow lib "Cocoa" selector "setHasShadow:" (id As integer, b As Boolean) hasShadow(self.Handle, false)

Tanks Will, Works fine !

In the future where I can this type of information, is there any example in Xojo ?

You mean declares? I learned it mostly by trial and error from bits and pieces in these forums and other projects. Here’s some links I can remember…

Page Not Found — Xojo documentation - the reference page. There might be more in the user guide pdf thing - by Charles Yeomans. Really flushes out the mechanics. Some of the examples might be calling out-of-date APIs but I believe the rest is still relevant.

GitHub - macoslib/macoslib: MacOSLib - a set of classes to use OS X specific functions in Real Studio / Xojo applications - it can be tricky but I’ve learned a lot and there’s a lot to learn by looking at how they did it

Apple Developer Documentation - you’ll need apples references too to find what you can call, like setHasShadow on NSWindow. I’ve only ever called apples built in frameworks but supposedly you can make your own or get other libraries and call them.

DeclareMaker - Easily Create iOS/Cocoa Declares from Apple Docs - General - Xojo Programming Forum - or maybe just use DeclareMaker by Jason King and forget learning it :slight_smile:

Tanks Will Shank !

does this shadow declare work on mac OS X < 10.10?