by Wes Savage (2 Submissions)
Category: Windows API Call/Explanation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 22nd November 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Map & Unmap network drives using the Windows "Map Dialog" boxes.
API Declarations
Private Declare Function WNetConnectionDialog Lib "mpr.dll" _
(ByVal hwnd As Long, ByVal dwType As Long) As Long
Call WNetConnectionDialog(Me.hwnd, 1)
End Sub
Private Sub Command2_Click()
Call WNetDisconnectDialog(Me.hwnd, 1)
End Sub