IMAQWarning Event
Syntax
Sub ControlName_IMAQWarning(StatusCode, ContextID, ContextDescription)
Applies To
Purpose
Fires when an NI-IMAQ warning occurs.
Remarks
You can write a global warning handler for the CWIMAQ control in the event handler for IMAQWarning. For example, you can compare the ContextID parameter to the CWIMAQErrorContexts constants in the event handler code to handle warnings only in certain contexts (configuring, reading data, and so on).
Parameters
StatusCode As Long
The status code for the warning.
ContextID As Long
Identifies the context of the warning. The CWIMAQErrorContexts constants define the possible values for this parameter.
ContextDescription As String
A textual description of the context.
Example
Private Sub CWIMAQ1_IMAQWarning(ByVal StatusCode As Long, ByVal ContextID As Long, ByVal ContextDescription As String) If ContextID = cwimaqAcquiring Then MsgBox ContextDescription & vbCrLf & CStr(StatusCode) End If End Sub