vb.net - How to choose how many times to run single CMD command in Visual Basic? -


i have written code in visual basic. works, want able choose how many times dos command run.

private sub button1_click(sender object, e eventargs) handles button1.click     dim command string     command = "ping " + "-l " + textbox2.text + " /t " + textbox1.text     shell("cmd.exe /k" & command, 0) end sub 

so have textbox called "textbox3" wanna able choose 1-100, how many times command run.

this way can enter number in textbox3 , command run time

private sub button1_click(sender object, e eventargs) handles button1.click     dim command string     i=0 cint(me.textbox3.text)         command = "ping " + "-l " + textbox2.text + " /t " + textbox1.text         shell("cmd.exe /k" & command, 0)     next end sub 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -