hang on,

Are you trying to programme the USB port or the parallel port?

If you have a parallel port then you can program to it. but if you don't have a physical parallel port then no you can't program to it

hang on,

Are you trying to programme the USB port or the parallel port?

If you have a parallel port then you can program to it. but if you don't have a physical parallel port then no you can't program to it

in my laptop don't have parallel port........
but i wanna buy port USB to DB25...... can i do my program or not???
if can are that's need driver or not????
:(

code goes here


frm1

Option Explicit
Dim Value As Integer
Dim PortAddress As Integer
Dim Timer As Integer
Dim label As Integer
Dim x As Integer
Dim b As Integer
Dim textbox As String


Private Sub Check1_Click()
If Check1.Value = 1 Then
Value = Inp(PortAddress)
Value = Value Or &H1
Out PortAddress, Value
Else
Value = Inp(PortAddress)
Value = Value And &HFE
Out PortAddress, Value
End If
End Sub

Private Sub Check2_Click()
If Check2.Value = 1 Then
Value = Inp(PortAddress)
Value = Value Or &H2
Out PortAddress, Value
Else
Value = Inp(PortAddress)
Value = Value And &HFD
Out PortAddress, Value
End If
End Sub

Private Sub Check3_Click()
If Check3.Value = 1 Then
Value = Inp(PortAddress)
Value = Value Or &H4
Out PortAddress, Value
Else
Value = Inp(PortAddress)
Value = Value And &HFB
Out PortAddress, Value
End If
End Sub

Private Sub Check4_Click()
If Check4.Value = 1 Then
Value = Inp(PortAddress)
Value = Value Or &H8
Out PortAddress, Value
Else
Value = Inp(PortAddress)
Value = Value And &HF7
Out PortAddress, Value
End If
End Sub


Private Sub Check5_Click()
If Check5.Value = 1 Then
Value = Inp(PortAddress)
Value = Value Or &O255
Out PortAddress, Value
Else
Value = Inp(PortAddress)
Value = Value And &O0
Out PortAddress, Value
End If
End Sub

Private Sub Check6_Click()
If Check6.Value = 1 Then
Value = Inp(PortAddress)
Value = Value Or &H40
Out PortAddress, Value
Else
Value = Inp(PortAddress)
Value = Value And &HBF
Out PortAddress, Value
End If
End Sub

Private Sub Check7_Click()
If Check7.Value = 1 Then
Value = Inp(PortAddress)
Value = Value Or &H20
Out PortAddress, Value
Else
Value = Inp(PortAddress)
Value = Value And &HDF
Out PortAddress, Value
End If
End Sub

Private Sub Check8_Click()
If Check8.Value = 1 Then
Value = Inp(PortAddress)
Value = Value Or &H10
Out PortAddress, Value
Else
Value = Inp(PortAddress)
Value = Value And &HEF
Out PortAddress, Value
End If
End Sub

Private Sub Command1_Click()
Value = &HFF
PortAddress = &H378
Out PortAddress, Value
Check1.Value = 1
Check2.Value = 1
Check3.Value = 1
Check4.Value = 1
Check5.Value = 1
Check6.Value = 1
Check7.Value = 1
Check8.Value = 1
End Sub

Private Sub Command2_Click()
Value = 0
PortAddress = &H378
Out PortAddress, Value
Check1.Value = 0
Check2.Value = 0
Check3.Value = 0
Check4.Value = 0
Check5.Value = 0
Check6.Value = 0
Check7.Value = 0
Check8.Value = 0
End Sub

module1

'Inp and Out declarations for port I/O using inpout32.dll.

Public Declare Function Inp Lib "inpout32.dll" Alias "Inp32" _
(ByVal PortAddress As Integer) _
As Integer

Public Declare Sub Out Lib "inpout32.dll" Alias "Out32" _
(ByVal PortAddress As Integer, _
ByVal Value As Integer)

This article has been dead for over six months. Start a new discussion instead.