Wait-for Statement (.net And Abl)

Kalan

Member
Hi all,

I display modal dialog message window using WAIT-FOR THIS-OBJECT:ShowDialog(). However I dont want user to manualy to close this window by Close the form by clicking on the X button. I want to close this programmatically. I have tried using myDlgForm: Close () but control does not comes to this stage to execute since Wait-for block the ctrl. Could you please suggest on this?

For example, I generate the report and display the status message 'In-Progress' in modal mode using ShowDialog() when the report generation process complete this message window should disappear without any user intraction and display the report output. At this moment, we have to close this 'In-progress' dialog window since we are calling using ShowDialog(). Also code syntax forces to use 'Wait-For'. i.e. WAIT-FOR THIS-OBJECT:ShowDialog().

Thanks.
 
I may be reading this incorrectly, but do you want the option of a dialog box type form but not use any WAIT-FOR's? If so, does using Show solve the problem:
Code:
DEFINE VARIABLE oForm AS Progress.Windows.Form NO-UNDO.

oForm = NEW Progress.Windows.Form().
oForm:ClientSize = NEW System.Drawing.Size(294, 61).
oForm:FormBorderStyle = System.Windows.Forms.FormBorderStyle:FixedDialog.
oForm:MaximizeBox = FALSE.
oForm:MinimizeBox = FALSE.
oForm:ShowInTaskbar = FALSE.
oForm:StartPosition = System.Windows.Forms.FormStartPosition:CenterParent.
oForm:Text = "In Progress".

oForm:Show().

FOR EACH Customer NO-LOCK:
   ...
END.

oForm:Close(). /* or oForm:Hide(). */

MESSAGE "Report finished." VIEW-AS ALERT-BOX.
 
Hi Osborne,

Thanks for your reply. At this moment we're using Show method -issue raised here by user when they switch into other application like outlook show window stays behind application and user can play or navigate to other docks in the same application. That's the main reason we preferred to use dialog modal mode. However, now I have managed this with the work around by changing the cursor status using "SET-WAIT-STATE " as it blocks user and system input.
Thanks again.

Cheers.
 
Back
Top