On Wed, 7 Apr 2004 07:51:11 -0700, "Joe Stanfield" <an*******@discussions.microsoft.com> wrote:
¤ 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 ~~~
pc******@ameritech.net
Microsoft MVP (Visual Basic)