By using "xprop", you can choose the window of program via mouse !


> Another possibility with "xprop" and
> DesktopWindows class.
> It need to activate gb.desktop.
> 
> ***************************
> 
> Private i As Integer
> 
> 
> Public Sub Form_Open()  
>  
> Dim pr As Process  
> Dim ss, x As New String[]  
> Dim s, y As String  
> Dim j As Byte  
>  
>  pr = Shell "xprop | grep -i window" For Read  
>   
>  
>  While Not Eof(pr)  
>    Input #pr, s  
>    If s < Chr(40) Then Continue  
>    ss.Add(s)  
>  Wend  
>  
>  
> For j = 0 To ss.Max  
>     
>   If ss[j] = "_NET_WM_USER_TIME_WINDOW(WINDOW):"
> Then  
> 
>     x = Split(ss[j + 3], "x")  
>     y = Right(ss[j + 7], 2)  
> 
>     i = Val("&" & x[1]) - Val("&"
> & y)  
>   Endif  
>     
> Next  
>  
> End
>  
>  
> Public Sub Button1_Click()  
>  
> Dim dw As DesktopWindow  
>  
>  
>   dw = New DesktopWindow(i)  
>  
> ' it closes the windows:
>    dw.Close
>  
> End
> 
> ******************************++
> 
> 
> It works for me !
> 
> bye
> vuott
> 


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to