I haven't yet had time to take a look at those books.
In the SelectArea app, I noticed that your version had a Horizontal Panel (in the FMain form) with the Select & Hint buttons. There was a Spring control placed between (connecting?) the 2 buttons. What does it do?
I'm now trying to get my SelectWindow app working (previous questions were on my SelectArea app). I fill various arrays (aWindowRect, aWindow) with elements from the DesktopWindow set of objects (which interestingly includes the what I think of as the Ubuntu Desktop which I ignore using the "If .VisibleName = "Desktop" And .Height = Screen.Height And .Width = Screen.Width Then Continue" code line below) using the FindWindows method you suggested in your last post. What does the SkipTaskbar property of the Desktop Window object actually mean?
Code: Select all
Public Sub Form_Open()
Dim i As Integer
Dim hDesktopWindow As DesktopWindow
For Each i In Desktop.FindWindow(Null, Null, Null)
hDesktopWindow = New DesktopWindow(i)
With hDesktopWindow
If .Minimized Then Continue
If .VisibleName = "Desktop" And .Height = Screen.Height And .Width = Screen.Width Then Continue
aWindow.Add(hDesktopWindow)
Print "DesktopWindow: ", "Name=" & .Name, "VisibleName=" & .VisibleName, "Hex(i)=" & Hex(i)
Print ".Id=" & .Id, "Left=" & .X, "Top=" & .Y, "Width=" & .Width, "Height=" & .Height
aWindowVisibleName.Add(.VisibleName)
aWindowRect.Add(.Geometry)
End With
I'm also intrigued by the FullScreen property of a DesktopWindow object. Would a FullScreen window cover the Launcher & Systray panels (e.g. when you run a video file in full screen 'mode')? Would its DesktpWindow details have a VisibleName property?
I have a DrawingAreaDesktop with Opacity=35 overlaying Ubuntu's desktop (as in the previous SelectArea app). This has a MouseUp event with some of its coding shown below. The problem is that if there are 2 windows overlapping then I want to select the window where the overlapping part is displayed on top (of Ubuntu's desktop). However, my code shown below only finds the first window in the aWindowRect array (the aWindow array contains all the DesktopWindow elements). Is there a way of cycling through these arrays to only select the DesktopWindow which is on top?
Code: Select all
For j = 0 To aWindowRect.Max
If aWindowRect[j].Contains(Mouse.X, Mouse.Y) Then
sWindowVisibleName = aWindowVisibleName[j]
hWindowRect = aWindowRect[j]
With hWindowRect
iWindowLeft = .Left
iWindowTop = .Top
iWindowWidth = .Width
iWindowHeight = .Height
End With
bWindowSelected = True
Break
Endif
Next