VB取得网络磁盘
Private Declare Function WNetConnectionDialog Lib "mpr.dll" (ByVal hwnd As Long, ByVal dwType As Long) As Long
Private Declare Function WNetDisconnectDialog Lib "mpr.dll" (ByVal hwnd As Long, ByVal dwType As Long) As Long
Public Function ShowMapDrives(hwnd As Long)
WNetConnectionDialog hwnd, 1
End Function
Public Function ShowUnMapDrives(hwnd As Long)
WNetDisconnectDialog hwnd, 1
End Fucntion
Private Sub Sho_Click()
ShowMapDrives Me.hwnd
End Sub
Private Sub Command2_Click()
ShowUnMapDrives Me.hwnd
End Sub