Re: [2008] How can i do this
You should create a TableLayoutPanel with the appropriate number of rows and columns, i.e. 1 and 3. Add a Label to each of the cells, leaving the first one blank. Set the TLP's AutoSize property to True. Then you can just add a Label and two TextBoxes for every server you want to test and the TLP will grow automatically.
Re: [2008] How can i do this
Another option, since the textboxes are apparently for display only, is to replace them with borderless labels. That way, the user won't see anything if the label is empty.
Re: [2008] How can i do this
ok so those 2 options can solve my problem on the front page, but what about if i only have 10 servers hard coded in and say i wanna make it possible to ping 20 servers? is there some code i can ise to ping upt ot 20 or even 30 servers without having to hard code each of them in?
Re: [2008] How can i do this
Whenever you add a "server" you can add it to a List, then each time you want to ping you just loop through the List and ping each one. Using my suggestion you don't even really need a List because you can just loop through the rows of the TLP. At each row you get the server address from the TextBox in the second column and then output the result to the TextBox in the third column.
Re: [2008] How can i do this
You could also make a user control that encapsulates all the functionality, from actual pinging code, the the UI itself.
Then use the tablelayout like John said, filling it with instances of this user control.
There are many ways to do it.