I have a ProcessBook Add-In that opens and closes embedded displays in a PIW workbook via a VB.NET windows form opened from a toolbar button. This add-in works fine in ProcessBook 3.2: clicking a button on the form will open and close the desired displays behind the still-open form, as designed.
In ProcessBook 2012 Sp1 (188.8.131.520), however, the displays will not close while my Add-In form is open. Once I close the Add-In form, all the displays that were supposed to already be closed then start to close. Is there a reason why the behavior would be different in these two versions of ProcessBook? Is there a known workaround for getting the behavior seen in ProcessBook 3.2 to work in ProcessBook 2012?
Here are some code excerpts from the project (VB.NET 3.5):
Dim entries as Entries = procBook.Entries Dim entry As Entry = Nothing For index as Integer = 1 to entries.Count entry = entries.Item(index) Dim display As Display = Nothing If CType(entry.Type, pbEntryLinkType) = pbEntryLinkType.pbEntryPDIEmbeddedInLocalPIW Then entry.Execute(True) display = procBook.Application.ActiveDisplay display.Close(False) 'doesn't work in PB 2012 SP1 until after Add-In form is closed display = Nothing End If Next