Map Drive in VB.NET

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello
How do I bring up the standard "Map Network Drive" dialog box using VB .NET
I've seen posts that describe how to map a drive (either via API or via the 'net use' command), but I want my program to bring up the system's default "Map Network Drive" dialog box (that the user would see if they clicked "Tools/Map Network Drive" in Explorer)

Thanks in advance for your guidance
Joe.
 
¤ Hello.
¤ How do I bring up the standard "Map Network Drive" dialog box using VB .NET?
¤ I've seen posts that describe how to map a drive (either via API or via the 'net use' command), but I want my program to bring up the system's default "Map Network Drive" dialog box (that the user would see if they clicked "Tools/Map Network Drive" in Explorer).
¤
¤ Thanks in advance for your guidance.
¤ Joe.


Private Declare Function WNetConnectionDialog Lib "mpr.dll" (ByVal hwnd As Integer, ByVal dwType
As Integer) As Integer

Public Sub DisplayMapDriveDialog()

Dim ReturnValue As Integer
Const RESOURCETYPE_DISK = &H1

ReturnValue = WNetConnectionDialog(Nothing, RESOURCETYPE_DISK)

End Sub


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Back
Top