本文介绍了使用vb.net帮助激活和停用并行端口引脚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有vb.net代码来控制并行端口,这是可行的
但是如何同时激活特定的引脚和停用其他引脚????
这是代码
I have vb.net code to controlling parallel port and it is work
but how I can activated specific pin and deactivated other pins in the same time???
this is the codes
Option Strict Off
Option Explicit On
Module InpOut32_Declarations
'Inp and Out declarations for port I/O using inpout32.dll.
Public Declare Function Inp Lib "inpout32.dll" Alias "Inp32" (ByVal PortAddress As Short) As Short
Public Declare Function Input Lib "inpout32.dll" Alias "Inp32" (ByVal PortAddress As Integer, ByVal Value As Integer)
Public Declare Sub Output Lib "inpout32.dll" Alias "Out32" (ByVal PortAddress As Integer, ByVal Value As Integer)
End Module
Public Class parallelport
Private Sub openpin5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles piforward.Click
Output(&H378, 8) 'to open pin number 5 D3
end sub
Private Sub openpin4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles piforward.Click
Output(&H378, 16) 'to open pin number 6 D4
end sub
end class
推荐答案
这篇关于使用vb.net帮助激活和停用并行端口引脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!