If it is too much trouble, I'll probably go and purchase a copy of VB instead. But since the thing is so small, the conversion hopefully won't be too much work. Here are the non-driver files. Do you think this will compile in .NET? Sorry about the long post this will make.
DOSINGLE.VBP:
Form=DOSINGLE.FRM
Module=DriverLINXLibrary; ..\LIB\DLVBLib.bas
Module=Module1; ..\..\..\dlocxapi\DLCODES.BAS
Module=DRVLNXVB; ..\..\..\dlocxapi\DRVLNXVB.BAS
Module=DriverLINXGUIInterface; ..\LIB\DLVBGui.bas
Object={4DE9E2A3-150F-11CF-8FBF-444553540000}#4.0#0; DLXOCX32.OCX
ProjWinSize=91,601,368,167
ProjWinShow=2
IconForm="DOSingleForm"
HelpFile=""
ExeName32="DOSingle.exe"
ExeName="AISVVB16.EXE"
Path="C:\WRKDRVLX"
Name="Project1"
HelpContextID="0"
StartMode=0
VersionCompatible32="0"
VersionCompatible="0"
MajorVer=1
MinorVer=0
RevisionVer=0
AutoIncrementVer=0
ServerSupportFiles=0
VersionCompanyName="Scientific Software Tools, Inc."
DOSINGLE.FRM
VERSION 4.00
Begin VB.Form DOSingleForm
Caption = "Single Digital Output Value"
ClientHeight = 2190
ClientLeft = 2895
ClientTop = 2190
ClientWidth = 4065
Height = 2595
Left = 2835
LinkTopic = "Form1"
LockControls = -1 'True
ScaleHeight = 2190
ScaleWidth = 4065
Top = 1845
Width = 4185
Begin VB.TextBox txtWrite
Height = 288
Left = 240
TabIndex = 1
Text = " "
Top = 576
Width = 1308
End
Begin VB.CommandButton cmdWrite
Caption = "&Write"
Default = -1 'True
Height = 492
Left = 2400
TabIndex = 0
Top = 420
Width = 1332
End
Begin DlsrLib.DriverLINXLDD DriverLINXLDD1
Left = 3120
Top = 960
_Version = 262144
_ExtentX = 582
_ExtentY = 582
_StockProps = 64
_Version = 262144
_ExtentX = 582
_ExtentY = 582
_StockProps = 64
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "Status "
Height = 192
Left = 240
TabIndex = 4
Top = 1440
Width = 480
End
Begin DlsrLib.DriverLINXSR DriverLINXSR1
Left = 2760
Top = 960
_Version = 262144
_ExtentX = 582
_ExtentY = 582
_StockProps = 64
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "Digital Output Value in Hex:"
Height = 384
Left = 240
TabIndex = 3
Top = 96
Width = 1332
WordWrap = -1 'True
End
Begin VB.Label lblStatus
BackColor = &H00FFFFFF&
BorderStyle = 1 'Fixed Single
Height = 312
Left = 240
TabIndex = 2
Top = 1752
Width = 3492
End
End
Attribute VB_Name = "DOSingleForm"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
Const LogicalDevice As Integer = 0 'DriverLINX Logical Device
Const LogicalChannel As Integer = 0 'DriverLINX Logical Channel
Const ChannelGain As Single = -1# 'Gain setting for Logical Channel
Const BackGroundForeGround As Integer = 0 'IRQ or DMA = 1, Polled = 0
Private Sub Form_Load()
Dim DLDriverName As String
Dim DLResultCode As Integer
Dim DLMessage As String
txtWrite.Text = "&h0"
CenterForm Me
DLDriverName = OpenDriverLINXDriver(DriverLINXSR1, "", True)
If DLDriverName = "" Then
MsgBox "DriverLINX driver not opened.", vbOKOnly, Me.Name
End
End If
DLResultCode = InitializeDriverLINXDevice(DriverLINXSR1, LogicalDevice)
If DLResultCode <> DL_NoErr Then
ShowDriverLINXStatus DriverLINXSR1
End
End If
If Not HasDriverLINXSubsystem(DriverLINXSR1, DriverLINXLDD1, DL_DO) Then
MsgBox "This device does not support digital output.", vbOKOnly, Me.Name
End
End If
GetDriverLINXStatus DriverLINXSR1, DLMessage
lblStatus.Caption = DLMessage
SetupDriverLINXSingleValueIO DriverLINXSR1, DriverLINXLDD1, LogicalDevice, DL_DO, LogicalChannel, ChannelGain, BackGroundForeGround
End Sub
Private Sub cmdWrite_Click()
Dim DLMessage As String
Dim DLResultCode As Integer
Dim user As Integer
Dim WriteValue As Integer
WriteValue = Val(txtWrite.Text) 'if value is hex enter as &hA for 10
If IsInDriverLINXDigitalRange(DriverLINXSR1, DriverLINXLDD1, DL_DO, WriteValue, LogicalChannel) Then
DriverLINXSR1.Res_Sta_ioValue = WriteValue
Else
user = MsgBox("Value Out of Range", vbOKOnly, "Warning!")
txtWrite.Text = "0" 'clear erroneous value
lblStatus.Caption = "Error"
Exit Sub 'leave sub
End If
DriverLINXSR1.Refresh
DLResultCode = GetDriverLINXStatus(DriverLINXSR1, DLMessage)
lblStatus.Caption = DLMessage
End Sub
Private Sub Form_Terminate()
End 'terminate the program
End Sub
Private Sub Form_Unload(Cancel As Integer)
CloseDriverLINXDriver DriverLINXSR1
End Sub