Connect to network drive : Network drive « Windows « VB.Net Tutorial






Connect to network drive
Imports System.Runtime.InteropServices

public class NetworkDriveConnectionDialog
      Const RESOURCETYPE_DISK As Short = 1
    
      Private Declare Function WNetConnectionDialog Lib "mpr.dll" (ByVal hwnd As Integer, ByVal dwType As Integer) As Integer


    Public Shared Sub Main
        WNetConnectionDialog(0, RESOURCETYPE_DISK)
    
    End Sub
End Class








24.6.Network drive
24.6.1.Connect to network driveConnect to network drive
24.6.2.Discocnnect the network drive