Posted 2 years ago

Code for Run in Vb.Net 2008

run

I will show how to create a Run in vb.net 2005,2008.

Tools

* Combobox

* Button

Code for OK Button:

Dim p As New System.Diagnostics.Process()

if combobox1.text=”” then

msgbox(“You input nothing!”,vbinformation)

else

p = process.start(combobox1.text)

end if

Code for Cancel Button:

End

Code for Browse Button:

Using ofd As New OpenFileDialog()
ofd.Filter = “All files (*.*)|*.*”
If (ofd.ShowDialog(Me) = Windows.Forms.DialogResult.OK) Then
Me.Combobox1.Text = ofd.FileName
End If
End Using

Posted 2 years ago

code for Run in a batch file?

@echo off

title Run

color 2f

echo Run:

:a

set /p n=

start %n%

goto a

Note: Copy the code and save as .bat or .cmd.