Go Back   Wiki NewForum | Latest Entertainment News > Career Forum & Tips > Tech Forum & Tutorial > Oracle Database, SQL, Application, Programming


How to bring up the network connections dialog using Win32 API


Reply
Views: 1121  
Thread Tools Rate Thread
  #1  
Old 08-09-2010, 12:48 PM
bholas bholas is offline
Award Winner
 
Join Date: Apr 2010
Posts: 4,977
Default 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 );
Listing #1 : Delphi code. Download netdrv (0.18 KB).


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 );
Listing #2 : Delphi code. Download netdrv2 (0.19 KB).

Reply With Quote
Reply

Tags
programming tips

New topics in Oracle Database, SQL, Application, Programming





Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
WikiNewForum)