If you want to give your users the opportunity to connect to network resources from within your program, all you have to do is call the "WNetConnectionDialog()" Win32 API function:
WNetConnectionDialog(
0,
RESOURCETYPE_DISK );
0,
RESOURCETYPE_DISK );
Listing #1 : Delphi code. Download netdrv (0.18 KB).
WNetConnectionDialog(
Handle,
RESOURCETYPE_DISK );
Handle,
RESOURCETYPE_DISK );
Listing #2 : Delphi code. Download netdrv2 (0.19 KB).