Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

The OnDataUpdated Event of the CWDataSocket ActiveX Control Does Not Occur

Primary Software: Measurement Studio>>Visual Basic Support
Primary Software Version: 6.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
When you use a CWDataSocket ActiveX control in Visual Basic 6.0 cwdsRead access mode, if you call the CWDataSocket.Update function and then display a message box, the event is lost and the event handler is not called. Is there a way around this behavior?

Solution:
Use one of the following solutions to solve this problem:
  1. Change the access mode of your CWDataSocket control to cwdsReadAutoUpdate. When you call the CWDataSocket.Update function, the event handler is called immediately.
  2. Call the CWDataSocket.Update function after displaying the message box. The event handler occurs after the message box is dismissed.
  3. Manually call the event handler before the message box using the following code:
    If CWDataSocket1.DataUpdated Then
       CWDataSocket1_OnDataUpdated CWDataSocket1.Data
    End If


Related Links:

Attachments:





Report Date: 04/02/2004
Last Updated: 11/12/2004
Document ID: 3819ECUP

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit