UNKNOWN '************************************** 'Windows API/Global Declarations for :Co ' nnect, Disconnect Networks Drives ( EASI ' LY ) '************************************** 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; '************************************** ' Name: Connect, Disconnect Networks Dri ' ves ( EASILY ) ' Description:Connects and Disconnects N ' etwork Drives from your System ' By: MASTER VB PROGRAMMER ' ' ' Inputs:None ' ' Returns:None ' 'Assumes:None ' 'Side Effects:None 'This code is copyrighted and has limite ' d warranties. 'Please see http://www.Planet-Source-Cod ' e.com/xq/ASP/txtCodeId.2209/lngWId.1/qx/ ' vb/scripts/ShowCode.htm 'for details. '************************************** 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