APIEnabled

此集合元素属性指示仿真器是否已启用 API。连接可能已启用或已禁用 API,具体取决于其 API 设置的状态(在 Z and I Emulator for Windows 窗口中,选择文件 → API 设置)。如果仿真器已启用,则值为 True;否则为 False。APIEnabled 是布尔数据类型且为只读。以下示例展示了 APIEnabled 属性。

Dim autECLConnList as Object
 
Set autECLConnList = CreateObject("ZIEWin.autECLConnList")
autECLConnList.Refresh
 
' This code segment checks to see if API is enabled.
' The results are sent to a text box called Result.
If Not autECLConnList(1).APIEnabled Then
  Result.Text = "No"
Else
  Result.Text = "Yes"
End If