locked
Create an easy IP changer RRS feed

  • Question

  • Hi everyone,

    Thanks for stopping by to help and thanks even more if you plan on staying to help me.  I am a controls engineer and I often have to use customer specific, static IP addresses.  I have decided I am going to code an IP changer. 

    Very simple...I want it to open a basic window with 3 text input fields...IP Address, Subnet Mask and Gateway.  It will have a confirm button also.  That's it.  When the confirm button is clicked it shoves the respective information in to the active ethernet adapter and the window closes itself, indicating the change has been made.

    I have Studio 2017 installed and have been watching some tutorials.  I used to code a little VB and HTML when I was a teenager but all I do anymore is ladder logic.  I know I can do this just need some guidance to get me going.  Any help that anyone can give me is greatly appreciated.

    Thursday, March 29, 2018 10:57 PM

All replies

  • This is the basic UI that I have made up so far...but I'm not really sure what direction to go from here...

    <Window x:Class="MainWindow"

            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
            xmlns:local="clr-namespace:IP_Changer"
            mc:Ignorable="d"
            Title="IP Changer" Height="116.533" Width="237.221">
        <Grid Margin="0,0,0,3" HorizontalAlignment="Left" Width="338">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="213*"/>
                <ColumnDefinition Width="125*"/>
            </Grid.ColumnDefinitions>
            <Button Content="Confirm" HorizontalAlignment="Left" Height="70" Margin="174,11,0,0" VerticalAlignment="Top" Width="51" Grid.ColumnSpan="2"/>
            <TextBox x:Name="Desired_IP_Input" HorizontalAlignment="Left" Height="20" Margin="3,11,0,0" TextWrapping="Wrap" Text="IP Address" VerticalAlignment="Top" Width="166"/>
            <TextBox x:Name="Desired_IP_Input_Copy" HorizontalAlignment="Left" Height="20" Margin="3,36,0,0" TextWrapping="Wrap" Text="Subnet Mask" VerticalAlignment="Top" Width="166"/>
            <TextBox x:Name="Desired_IP_Input_Copy1" HorizontalAlignment="Left" Height="20" Margin="3,61,0,0" TextWrapping="Wrap" Text="Gateway" VerticalAlignment="Top" Width="166"/>

        </Grid>
    </Window>
    Thursday, March 29, 2018 11:13 PM
  • Well WPF even though using VB.net has a different Forum where peeps are more expert on XAML.

    La vida loca

    Thursday, March 29, 2018 11:55 PM
  • The new thread is Want to create an easy IP changer.


    Sam Hobbs
    SimpleSamples.Info

    Friday, March 30, 2018 2:42 AM
  • Thanks
    Friday, March 30, 2018 2:44 AM