Desktop.windows give only active window [solved]
Posted: Thursday 7th October 2021 5:43pm
I'm trying to align a transparent window on top of another window (a mediaplayer window) and therefore it would be very helpful to get the X and Y coordinates for both windows.
I found a code example in the Gambas Book (gambas-buch.de) chapter 15.4 which does exactly what I want.
The problem is that I only recieve the active window and nothing else. In the book they recieve all windows, not only the active one.
I have included gb.desktop and gb.desktop.x11.
Gambas version is 3.16.3 on Linux mint 20.1 Cinnamon.
Obviously I'm doing something wrong or missing some important stuff but what?
Ps Will be a measuring microscope when finished
I found a code example in the Gambas Book (gambas-buch.de) chapter 15.4 which does exactly what I want.
Code: Select all
Public Sub Button1_Click()
Dim dtWindow As DesktopWindow
Desktop.Windows.Refresh()
For Each dtWindow In Desktop.Windows
If dtWindow.SkipTaskbar = False Then
Print "Window.Name = \"" & dtWindow.Name & "\" , X = " & dtWindow.X & " , Y = " & dtWindow.Y
Endif
Next
End
I have included gb.desktop and gb.desktop.x11.
Gambas version is 3.16.3 on Linux mint 20.1 Cinnamon.
Obviously I'm doing something wrong or missing some important stuff but what?
Ps Will be a measuring microscope when finished