[Gambas-user] gb.desktop - How to know which window has focus?
Benoît Minisini
gambas at ...1...
Fri Jul 24 00:14:10 CEST 2015
Le 22/07/2015 23:19, herberth guzman a écrit :
> I have a question.?
> Can you help me please.
> to activate a window is:
>
> Desktop.Windows.FromHandle (Value) .Activate
> or
> Desktop.ActiveWindow = value
>
> I have a problem.
> I have 3 WINDOWS and the 3 WINDOW ARE ACTIVE.
>
> How to know which window has focus and how to change it...?
> i am trying to fix it and I can not.
>
> Attached is an example.
>
> regards
>
> Herberth
>
Desktop.ActiveWindow gives you the id of the currently active window.
Setting that property asks the window manager to change the current
active window. It's exactly the same thing has calling the Activate()
method on a DesktopWindow object.
I suggest you read the 'gb.desktop' source code to understand what
happens exactly.
Anyway, there is only one active window, as the X11 root window property
that stores the active window only returns one window id, so I don't
understand how you can say that you have three active windows !?
Regards,
--
Benoît Minisini
More information about the User
mailing list