Windows 10 - Window background transparent?

Hey all,
I have an interesting issue that i’ve researched a bit, but not sure how to go about doing it.

I have an image saved as a 32-bit .PNG with a transparent background, but in Xojo it shows with a white background no matter what settings I use. See pic:

What’s the best and easier way to get this to display without the white background on Windows 10? Maybe a solution for both Mac and Windows?
Thanks!

Have you given this a try?

https://forum.xojo.com/5071-how-to-create-a-transparent-window/p1#p35688

[quote=423860:@Jonathan Eisen]Have you given this a try?

https://forum.xojo.com/5071-how-to-create-a-transparent-window/p1#p35688[/quote]

I saw this. How would I call this?

  1. Copy the whole method into your project.
  2. Set the parameters as those specified in the header.
  3. Then call that method before showing that window passing the window as an object and a value for the alpha channel.

How is that overlayed? A control over another control or is it all being painted via a single canvas?

Edit: Can you also link the image?

[quote=423955:@JulianS]How is that overlayed? A control over another control or is it all being painted via a single canvas?

Edit: Can you also link the image?[/quote]

It’s a window with a backdrop and 6 canvases being used for the ‘buttons’. The graphic backdrop has a .PNG transparent alpha channel, so it should be transparent, I think.

[quote=423910:@Jonathan Eisen]1. Copy the whole method into your project.
2. Set the parameters as those specified in the header.
3. Then call that method before showing that window passing the window as an object and a value for the alpha channel.[/quote]

It works, but for the whole window, not just the white background part. Sorta cool though.

You should change the title of this Thread :wink:

Ah. Is there no way to refactor the code to have the image drawn on the canvas of the main screen rather then using another window?

If you want to key out a window in windows, take a look in the examples folder under Platform-specific>Windwos>CustomWindowShape

Here’s an example I put together a while back for someone to show animation on a key’d window that uses a slightly different method:

https://www.dropbox.com/s/at4ktyd0cxkn126/TestCircleRotationOnTransparentBackground.xojo_binary_project?dl=1

Hope it helps.