デバイスドライバが有効か(true)無効か(false)を示す Boolean 値を戻したり、設定したりします。有効状態によって、デバイスがアクティブかどうかが決まります。
デバイスをオフ(無効)にすると、デバイスドライバ内のすべてのチャンネルが接続解除されます。
// get accessor Boolean rtn = Device.Enable; // set accessor Device.Enable = Boolean; |
Application.Devices.enable = true
' first add the device if it is not there yet
set oDevice = Application.Devices.Item("PC1600")
If TypeName (oDevice) = "Nothing" Then
set oDevice = Application.Devices.AddDevice( "PC1600" )
End If
If Not oDevice.Enable Then
oDevice.Enable = True
End If |