README.md
December 4, 2022 ยท View on GitHub
Description
Connects and Disconnects Network Drives from your System
More Info
| Submitted On | |
| By | MASTER VB PROGRAMMER |
| Level | Unknown |
| User Rating | 6.0 (605 globes from 101 users) |
| Compatibility | VB 5.0, VB 6.0 |
| Category | Windows System Services |
| World | Visual Basic |
| Archive File |
API Declarations
Declare Function WNetConnectionDialog Lib "mpr.dll" (ByVal hwnd As Long, ByVal dwType As Long) As Long
Declare Function WNetDisconnectDialog Lib "mpr.dll" (ByVal hwnd As Long, ByVal dwType As Long) As Long
Public Const RESOURCETYPE_DISK = &H1
Source Code
Private Sub cmdConnect_Click()
Dim x As Long
If Index = 0 Then
x = WNetConnectionDialog(Me.hwnd, RESOURCETYPE_DISK)
End If
End Sub
Private Sub cmdDisconnect_Click()
If Index = 1 Then
x = WNetDisconnectDialog(Me.hwnd, RESOURCETYPE_DISK)
End If
End Sub