Relay contol VB6

I am totally new to this and have the following question:
In the code below I was using the parallel port to turn on and off the relay.
What would I replace the two relay control commands with to do the same withe the Velleman L8055?

Private Sub Timer08_Timer() '500ms
Out 888, 176 'Turns on relay
sndPlaySound App.Path & “\MM.wav”, SND_ASYNC 'plays song
Out 888, 0 'Turns off relay
Timer08.Enabled = False
End Sub

Also how would I have the K8055 automatically connect when the program starts.

Here is a code example for VB that seems similar enough to what you are doing.

viewtopic.php?f=4&t=3995&start=15#p13845

Regards,
Jan

I think I messed up on this codde. I’m so used to the parallel port. Here’s my attempt, bud it doesn’t work.

Option Explicit
Dim n As Integer
Private Declare Sub ReadAll Lib “k8055d.dll” (data As Long)
Private Declare Function Version Lib “k8055d.dll” () As Long
Private Declare Function SearchDevices Lib “k8055d.dll” () As Long
Private Declare Function SetCurrentDevice Lib “k8055d.dll” (ByVal CardAddress As Long) As Long
Private Declare Function OpenDevice Lib “k8055d.dll” (ByVal CardAddress As Long) As Long
Private Declare Sub CloseDevice Lib “k8055d.dll” ()
Private Declare Sub ClearDigitalChannel Lib “k8055d.dll” (ByVal Channel As Long)
Private Declare Sub ClearAllDigital Lib “k8055d.dll” ()
Private Declare Sub setdigitalchannel Lib “k8055d.dll” Alias “SetDigitalChannel” (ByVal Channel As Long)
'Main program start
Private Sub cmdStart_Click()
Timer1.Enabled = True
End Sub
'End program
Private Sub cmdStop_Click()
End
End Sub

Private Sub Form_Load()
OpenDevice (0)
End Sub

Private Sub Timer1_Timer() '20ms
Dim WriteAllDigital As Long
digitalChannel(1) = 1
sndPlaySound App.Path & “\WELCOME.wav”, SND_ASYNC
Timer1.Enabled = False
DigitalChannel(1) = 0
End Sub

Hive finally got it right.Thanks for the help.