The event handler that gets called when the progress of an internal process is about to begin, is being updated, or has completed.
Syntax:
<Object>_ProgressNotify(<ProgressNotify Object>)
Progress Type:
Example:
The following is an example that shows how to listen to progress notifications.
' Set up FREDI to receive events in the module
Private WithEvents m_oEdiDoc As ediDocument
:
' In the main routine start an instance of FREDI
Set m_oEdiDoc = New ediDocument
:
:
' This is an event handler for ProgressNotify that captures progress notifications from
' FREDI.
Private Sub m_oEdiDoc_ProgressNotify(ByVal ProgressNotify As Edidev.FrameworkEDI.ediProgressNotify) Handles m_oEdiDoc.ProgressNotify
If ProgressNotify.ProgressState = ProgressStateConstants.Progress_Phase_Start ThenEnd Sub
Select Case ProgressNotify.ProgressTypeElseIf ProgressNotify.ProgressState = ProgressStateConstants.Progress_Phase_Update Then
Case ProgressTypeConstants.Progress_Type_Single_ImportEnd Select
TextBox1.Text = TextBox1.Text & "Progress Start. Importing single SEF" & vbCrLfCase ProgressTypeConstants.Progress_Type_Codes_Read
Application.DoEvents()
TextBox1.Text = TextBox1.Text & "Progress Start. Reading SEF Codes" & vbCrLfCase ProgressTypeConstants.Progress_Type_Document_Read
Application.DoEvents()
TextBox1.Text = TextBox1.Text & "Progress Start. Reading EDI Document" & vbCrLfCase ProgressTypeConstants.Progress_Type_Document_Save
Application.DoEvents()
TextBox1.Text = TextBox1.Text & "Progress Start. Saving EDI Document" & vbCrLf
Application.DoEvents()
Select Case ProgressNotify.ProgressType
Case ProgressTypeConstants.Progress_Type_Single_ImportEnd Select
TextBox1.Text = TextBox1.Text & "Progress Update. Importing single SEF at %" & CStr(ProgressNotify.Percent) & vbCrLfCase ProgressTypeConstants.Progress_Type_Codes_Read
Application.DoEvents()
TextBox1.Text = TextBox1.Text & "Progress Update. Reading SEF Codes at %" & CStr(ProgressNotify.Percent) & vbCrLfCase ProgressTypeConstants.Progress_Type_Document_Read
Application.DoEvents()
TextBox1.Text = TextBox1.Text & "Progress Update. Reading EDI Document at %" & CStr(ProgressNotify.Percent) & vbCrLfCase ProgressTypeConstants.Progress_Type_Document_Save
Application.DoEvents()
TextBox1.Text = TextBox1.Text & "Progress Update. Saving EDI Document at %" & CStr(ProgressNotify.Percent) & vbCrLf
Application.DoEvents()
ElseIf ProgressNotify.ProgressState = ProgressStateConstants.Progress_Phase_Complete Then
Select Case ProgressNotify.ProgressTypeEnd If
Case ProgressTypeConstants.Progress_Type_Single_ImportEnd Select
TextBox1.Text = TextBox1.Text & "Progress Completed. Importing single SEF" & vbCrLfCase ProgressTypeConstants.Progress_Type_Codes_Read
Application.DoEvents()
TextBox1.Text = TextBox1.Text & "Progress Completed. Reading SEF Codes" & vbCrLfCase ProgressTypeConstants.Progress_Type_Document_Read
Application.DoEvents()
TextBox1.Text = TextBox1.Text & "Progress Completed. Reading EDI Document" & vbCrLfCase ProgressTypeConstants.Progress_Type_Document_Save
Application.DoEvents()
TextBox1.Text = TextBox1.Text & "Progress Completed. Saving EDI Document" & vbCrLf
Application.DoEvents()