canvas transperancy or making particular portion of window transparent

i want to make particular portion of the window to be transparent.
i dont want entire window to be transparent so i have draw rectangle on the window, so i want the rectangle portion of the window to be transparent.
plz help me

You know that if you overlay a window on top of another the bottom window will not receive clicks.

I ask that you explain in detail exactly what you’re attempting to do by overlaying a window on top of another app and trying to control it with shell. This will let us know how what you really want from Xojo, because you asked for a transparent window and Axel gave you one.

i have window1 with graphics drawn on canvas as

MyPic =New Picture(g.Width,g.Height)
MyPic =Self.BitmapForCaching(g.Width,g.Height)


Dim x As Integer = Xojo.Math.RandomInt(0, 286)+185
Dim y As Integer = Xojo.Math.RandomInt(0,223)+81
MyPic.Graphics.ForeColor = &cff0000 // Red
MyPic.Graphics.FillRect(x, y, 5, 5)



i have window2 which i want to be transparent but only where the rectangle exists that is

Not sure if this helps but I did see some helpful info on making windows transparent here If it’s a “fixed” location you want transparent. Seems like setting the entire window to transparent, and then making whatever portions you want visible with rectangle controls would work? I was able to create a window that has a transparent quadrant or “hole” in the middle etc.

i have make entire window transparent but what kind of rectangle controls can be used to make particular rectangle portion of that window will become transparent

I approached the problem by making the entire window transparent…and then used rectangle controls to make portions of that window NOT transparent. By turning off the border lines on the rectangles I created the illusion of a solid window with a transparent region, where in fact it was a transparent window with multiple solid regions.

You cannot make a window transparent with a simple control. It requires touching the window itself with declares. You did not say if that was for Mac or Windows, but there are solutions for each.

Robert Bednar linked to an excellent declare for Mac.

For Windows, see /Applications/Xojo 2016 Release 3/Example Projects/Platform-Specific/Windows/CustomWindowShape/WindowShape.xojo_binary_project

ok thanks