Software Information
IDE : Microsoft Visual Studio 2008 Express Edition Version 9.0
Language : Microsoft Visual Basic .Net
.Net Version 3.5
Hello all
Problem
I am use the k8047d.dll in my VB.net application. I am having trouble getting even the simplest thing to work, such as turning the record LED on.
After many hours trawling the net for the solution, I am hoping someone can help me, as I am sure it is a trivial problem.
What I Have Done
I have run the setup program found in k8047_pcs10_dll.zip, and included k8047d.dll and k8047E.exe in project folder, and the project bin folder.
To simplify matters, I am attempting the most basic problem I could think of. I have a blank form with a checkbox, hoping to toggle the record LED when the box is clicked.
What happens when program is run
When the program is run, and the box is clicked, I receive no errors, and have a succesful compilation. However, the LED does not turn on. When I run the demo program found in the k8047_pcs10_dll.zip, the LED works when the checkbox is clicked.
Please find below the entirety of my code. The main function is the checkbox changed procedure.
[code]Public Class UsbDatalogger
Public Declare Sub StartDevice Lib “k8047d.dll” ()
Public Declare Sub StopDevice Lib “k8047d.dll” ()
Public Declare Sub LEDon Lib “k8047d.dll” ()
Public Declare Sub LEDoff Lib “k8047d.dll” ()
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As _
System.EventArgs) Handles MyBase.Load
StartDevice()
Debug.Print("device started")
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked Then
LEDon()
Debug.Print("led on")
Else
LEDoff()
Debug.Print("led off")
End If
End Sub
Private Sub Form1_Close(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.FormClosing
StopDevice()
Debug.Print("device Stopped")
End Sub
End Class[/code]
Many thanks in advance for any help offered.