CODE to learn state of HIDE OR SHOW OVERLAY . . .
In IMAGE-PRO 10, the
COUNT/SIZE + SELECT + HIDE OR SHOW OVERLAY TOOL
allows a USER select this OPTION.
When a MACRO is recorded of this OPTION being turned OFF and ON, the following CODE is generated.
Public Function NewMacro() As SimpleScript NewMacro = New SimpleScript Dim doc1 With Application.DocumentCommands.Active(NewMacro) .Run(doc1) End With With Measure.MeasurementsCommands.ShowOverlay(NewMacro) .CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.Unchecked .Run(doc1) End With With Measure.MeasurementsCommands.ShowOverlay(NewMacro) .CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.Checked .Run(doc1) End With End Function
I would like my CODE to be able to check the STATUS of the OVERLAY (HIDDEN or SHOWING).
I have attempted to get the STATUS using
Debug.Print "11" Debug.Print measure.MeasurementsCommands.ShowOverlay(Nothing).CheckState Debug.Print "22" If (measure.MeasurementsCommands.ShowOverlay(Nothing).CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.checked) _ Then Debug.Print "TRUE" Else Debug.Print "FALSE" End If
within a routine that is run once per second but I get
in my IMMEDIATE WINDOW whether the OVERLAY is HIDDEN or SHOWING.
I can HIDE or SHOW the overlay with a routine that is similar to NewMacro but that routine is controlled by a SHOW OVERLAY CHECKBOX in my DIALOG BOX. I would like the CHECKBOX to have a STATUS that matches the HIDE / SHOW OVERLAY.
Is there a way to check the OVERLAY STATUS via CODE?