1 of 1 people found this helpful
I was able to successfully scroll through a list of displays open in the same parent instance of ProcessBook as shown here:
I added the Reference libraries (Tools>References) of PISDK 1.3 Type Library and PISDKCommon 1.0 Type Library. The code snippet to scroll them is this:
'# This code snippet will scroll displays in the same parent instance of ProcessBook
Dim currentDisplay As Display
Dim myDisplays As Displays
Set myDisplays = Application.Displays
For Each currentDisplay In myDisplays
I loaded that code snippet in a module in Display1. I also attempted using the same code to scroll three separate instances of ProcessBook without success.
Matt, as James mentioned, the Application.Displays collection contains the list of open displays. It stays within the same Application instance, though, so the main question would be if you have multiple instances of ProcessBook open or if you have all of your displays open within the same instance.
Kelsey - thanks for the info. To your question, this would be within a single instance of Processbook. Ultimately I want to create custom functionality for my buttons to navigate around my processbook. The issue I'm trying to avoid is having the same display open multiple times simultaneously, where some are read-only. Currently, when I use the standard navigation buttons to open a different display, they will either 1) close the current display X and open the new display Y, or 2) keep display X open and open display Y in a new window - which is where I start to get the same display open several times. What I'm looking to do is create a button that assess if display Y is already open within the processbook and if it is just bring it to the front (and keep display X open). And if display Y isn't open already, then go ahead and open it in a new window as usual. Any suggestions?