Mega Code Archive

 
Categories / Delphi / Examples
 

How to bring up the network connections dialog using win32 api

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 ); First parameter is the handle of the parent Window, so if you're calling "WNetConnectionDialog()" from a "form" window, you can pass "Handle" to make the network drives dialog a child window of the form. WNetConnectionDialog( Handle, RESOURCETYPE_DISK );