Adjusting Interaction window popup location in Image-Pro 11 Add-In
Dear Sir,
I am migrating an Add-In developed in Image-Pro 10 to Image-Pro 11.
After the migration, I noticed a change in the UI behavior: the Interaction prompt window now appears below the image file tab (name label). In IP10, it popped up above the tab, which did not block the view of the McImage content. In IP11, however, it overlays and obstructs the image display.
Is there a setting, property, or API command in IP11 to adjust the position or popup direction of the Interaction prompt?
Any advice or code snippet would be greatly appreciated.
Total-Smart Tech. Co., Ltd.
Wesan
Total-Smart Tech. Co., Ltd.
Wesan
Tagged:
0
Answers
-
2026-08-18-150341Wesan --Will you please post the lines of your PROGRAM CODE that make this INTERACTION PROMPT appear within IMAGE-PRO 10 and IMAGE-PRO 11?-- Matt0
-
Hi Matt,
I'm displaying the Interaction on the currently focused ActiveDocument and have tried changing the InteractionLocation settings, but it's not working.Public Function ShowPrompt(ByVal msg As String) As SimpleScript ShowPrompt = New SimpleScript Dim doc1 As IMcDocument = _ModApp.ActiveDocument Try With Automate.ScriptingCommands.Interaction(ShowPrompt) .Prompt = msg .Interactive = True .InteractionLocation = McCommand.InteractionPosition.Top .Run(doc1, doc1) End With Catch 'user clicked Cancel, exit Finally End Try End Function
Total-Smart Tech. Co., Ltd.
Wesan
0 -
2026-08-19-164820Wesan --Thank you for that additional information.I looked through my projects and I found a couple of sections of CODE that use the .INTERACTION MODULE.I have included them below.I hope one of these helps.-- Matt*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-'Display an INTERACTION BALLOON and wait for OK or CANCEL
With Automate.ScriptingCommands.Interaction(Nothing)
.Interactive = _
True
.Text = _
"POLYGON NUDGE TOOL is ACTIVE"
.Image = _
.GetImage("Select.Image.ToggleEditToolNudge")
.Prompt= _
"Use the LEFT MOUSE BUTTON to edit the SELECTED OBJECT with the NUDGE TOOL." & vbLf & vbLf & _
"Use the MOUSE WHEEL to change the DIAMETER of the NUDGE TOOL." & vbLf & vbLf & _
"Press the N KEY to switch between the NUDGE TOOL and the MEASUREMENT SELECT TOOL." & vbLf & vbLf & _
"Press OK or CANCEL to FINISH."
.Run(ThisApplication.ActiveDocument, Nothing)
End With*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-'Use TRY and CATCH to handle errors
Dim My_Flag As String
Try
'Display an INTERACTION BALLOON
With Automate.ScriptingCommands.Interaction(Nothing)
.Text = "Select RECTANGULAR ROI"
.Image = .GetImage("Select.Roi.Tools.Rectangle")
.Prompt = "Please create a RECTANGULAR ROI around the ENTIRE TOOTH then press OK!"
.Interactive = True
.Run(ThisApplication.ActiveImage, Nothing)
End With
My_Flag = "TRY"
Catch
My_Flag = "CATCH"
Finally
'If the user pressed OK
If (My_Flag = "TRY") _
Then
'Do nothing
Else
'Do nothing
End If
End Try*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-'Use TRY and CATCH to handle errors
Dim My_Flag As String
Try
'Display an INTERACTION BALLOON
With Automate.ScriptingCommands.Interaction(Nothing)
.Text = "Create POLYGON ROI"
.Image = .GetImage("Select.Roi.Tools.Polygon")
.Prompt = "Please create POLYGON ROIs around the CRYPTS then press OK!"
.Interactive = True
.Run(ThisApplication.ActiveImage, Nothing)
End With
' My_Flag = "TRY"
Catch
' My_Flag = "CATCH"
Finally
' 'If the user pressed OK
' If (My_Flag = "TRY") _
' Then
'
' 'Do nothing
'
' Else
'
' 'Do nothing
'
' End If
End Try*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-Try
'Allow the user to ROTATE and TRANSLATE the image a pixels over the image b pixels
With Select.AnnotationsCommands.MoveSelected(Nothing)
.Overlay = Overlays.OverlayType.AnnotationsOverlay
.Prompt = _
"A watermark has been placed on the image." & vbLf & vbLf & _
"ROTATE and TRANSLATE the image." & vbLf & vbLf & _
"OK to CONTINUE, CANCEL to RESET."
.Interactive = True
.InteractionLocation = McCommand.InteractionPosition.OutsideBottom
.Run(docB)
End With
'If the user CANCELS
Catch
'Raise the CANCEL FLAG
MyCancelFlag = True
'Delete the image a pixel overlay layer
With Select.AnnotationsCommands.DeleteSelected(Nothing)
.Overlay = Overlays.OverlayType.AnnotationsOverlay
.Run(docB)
End With
End Try*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 19 Image-Pro Download & Install
- 444 Image-Pro General Discussions
- 489 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 193 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 105 Image-Pro Plus General Discussions
- 85 Image-Pro Plus Automation with Macros
- 36 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 20 Image-Pro Insight General Discussions
