Restore view of Image-Pro Plus application
(Originally posted by jonshort on 6/11/2007)
I
created an IPP 5.1 macro that has a custom form. The macro walks users
through recording a couple linear measurements, then opens Excel and
exports the data. My problem is that if the IPP window is minimized
while the macro is running I can't get the IPP window to view again when
I click on the program in the task bar. Only the IPP macro form is
visible. If I right click on the task bar item and click Restore it
will be visible again, but my users are getting confused. Suggestions?
0
Comments
(Originally posted by KevinR on 6/12/2007)
You can use the "IpAppRestore( )" function for this. This can be an additional button on the dialog, or checked when you do something else in the dialog.
See the code below:
' Restore application view Sub TestRestore() Begin Dialog UserDialog 180,84,"Testing Restore",.dlgRestore ' %GRID:10,7,1,1 PushButton 40,14,90,21,"Restore",.Restore OKButton 40,49,90,21 End Dialog Dim dlg As UserDialog Dialog dlg End Sub Rem See DialogFunc help topic for more information. Private Function dlgRestore(DlgItem$, Action%, SuppValue?) As Boolean Select Case Action% Case 1 ' Dialog box initialization Case 2 ' Value changing or button pressed dlgRestore = True ' Prevent button press from closing the dialog box Select Case DlgItem$ Case "Restore" ret = IpAppRestore( ) Case "OK" dlgRestore = False End Select Case 3 ' TextBox or ComboBox text changed Case 4 ' Focus changed Case 5 ' Idle Rem Wait .1 : dlgRestore = True ' Continue getting idle actions Case 6 ' Function key End Select End Function