-2

I would like to create a program with which the user can configure its tcp network settings like

  • use DHCP or not
  • if not, then set up ip-address, subnet, gateway, etc by hand.

Basically it should be what this dialog is doing:

enter image description here

Is this possible? I guess there could be some native win32 functions for this, which i could PInvoke.

clamp
  • 33,000
  • 75
  • 203
  • 299
  • 1
    have you done any research? I found [this](http://stackoverflow.com/q/209779/238902) for instance. It seems to be answering your question? – default Jul 07 '14 at 10:41
  • are you asking how to create a custom UI (as the title suggests) or how to configure the tcp settings? – default Jul 07 '14 at 10:42
  • @Default to configure the tcp settings – clamp Jul 07 '14 at 11:49

1 Answers1

1

You want to use System.Management for this

 ManagementClass managementClass = new ManagementClass("Win32_NetworkAdapterConfiguration");
 ManagementObjectCollection managementObjectCollection = objMC.GetInstances();

then you should be able to iterate the collection and change values that you need.

Matas Vaitkevicius
  • 58,075
  • 31
  • 238
  • 265