LabVIEW可以存取ActiveX Event回傳的資料嗎?



主要軟體: LabVIEW Development Systems>>LabVIEW Full Development System
主要軟體版本:
主要軟體修正版本:
次要軟體: LabVIEW Development Systems

問題: 我知道在LabVIEW 5.1及其後的版本提供回應ActiveX Events的能力。要如何存取ActiveX Event所回傳的資料呢?

解答:

LabVIEW 5.1是第一個支援ActiveX events的版本。LabVIEW 5.0僅支援ActiveX controls的methods及properties。

Wait on ActiveX Event.vi有一個輸出參數Event Data,可以用來提供ActiveX event所回傳的資料。Event Data是一個內含四個elements的叢集。其中一個element,ParamDaata,是一個資料型態為vairant的陣列。陣列中的每一個variant代表的是event回傳的參數值。你可以使用To G Data function(LabVIEW 6.0中的Variant To Data)來轉換這些variants為LabVIEW的資料型態。如果你不確定event回傳哪些資料,使用List Event Descriptions VI或查詢ActiveX Server/Control的相關文件說明。



相關連結: Developer Zone Example: ActiveX and LabVIEW
Developer Zone Example: Using ActiveX Events with LabVIEW and Custom Controls
Developer Zone Example: Using the Microsoft Web Browser ActiveX Control

附加檔案:





報告日期: 02/01/1999
最後更新: 01/11/2008
文件偏號: DIRECT-44PLYE