Device.Enable

Description

Returns or sets a Boolean value indicating whether the device driver is enabled (true) or not. The enable state determines whether a device is active or not.

Turning off (disabling) the device disconnects all channels in the device driver.

C# Syntax

// get accessor
Boolean rtn = Device.Enable;
// set accessor
Device.Enable = Boolean;

Examples

VBScript Example

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