PDA

View Full Version : [CLOSED] Count open windows on the desktop



ermanni.info
Aug 12, 2014, 1:45 AM
Hi!

I'm using in my desktop project. I need to get the amount of windows open on the desktop. How can I get this information?

What is the setting to use? Tray on the taskbar have a combobox for selecting the company that the user will work. While no window is open the combo can be accessed. To open the first window the combobox should be disabled.

What say you? You can create this control?

Thank you!

Ermanni

Daniil
Aug 12, 2014, 1:31 PM
Hi @ermanni.info,

I can suggest this code.

var wins = App.Desktop1.desktop.windows
isAnyWindowVisible = false;

wins.each(function(win) {
if (win.isVisible()) {
isAnyWindowVisible = true;
return false;
}
});

alert(isAnyWindowVisible);

ermanni.info
Aug 16, 2014, 7:25 PM
Hi Daniil,

Your suggestion worked perfectly!

Many thanks for the help!

Ermanni