VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Connect or disconnect a LPT port

by Karthikeyan (187 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Fri 15th December 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Connect or disconnect a LPT port

API Declarations


(ByVal hwnd As Long, ByVal dwType As Long) As Long
Private Declare Function WNetDisconnectDialog Lib "mpr.dll" (ByVal hwnd As Long, ByVal dwType As Long) As Long


Rate Connect or disconnect a LPT port



'Connect LPTx
xyz = WNetConnectionDialog(Me.hwnd, 2)
End Sub

Private Sub Command2_Click()
'Disconnect LPTx
xyz = WNetDisconnectDialog(Me.hwnd, 2)
End Sub

Download this snippet    Add to My Saved Code

Connect or disconnect a LPT port Comments

No comments have been posted about Connect or disconnect a LPT port. Why not be the first to post a comment about Connect or disconnect a LPT port.

Post your comment

Subject:
Message:
0/1000 characters