BP Forums
Help! I need you! - Printable Version

+- BP Forums (https://bpforums.info)
+-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55)
+--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56)
+---- Forum: VB.NET (Visual Basic 2010/2008) (https://bpforums.info/forumdisplay.php?fid=8)
+---- Thread: Help! I need you! (/showthread.php?tid=373)



Help! I need you! - TheT3chie - 07-28-2011

so hey guys, I have just started work with visual basic so am a little clueless. I am creating a program witch will run other.exe files when you press the button. How would I go about doing this? Please help! <!-- sBig Grin --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="Big Grin" title="Very Happy" /><!-- sBig Grin -->


Re: Help! I need you! - LearningVB2010 - 07-29-2011

You can use:

Process.Start("c:\whateveruwanttorun.exe")
or
Shell("c:\whateveruwanttorun.exe) (don't know exactly of this one will work)


you can also put all the exe's from a directory in a listbox:

Dim exeArray As String() = FileIO.FileSystem.GetFiles(Application.StartupPath, 2, "*.exe").ToArray

ListBox1.Items.AddRange(exeArray)


and then run them for example from there by clicking on them.


Re: Help! I need you! - brandonio21 - 07-30-2011

Yeah, LearningVB has it correct.

And is that how you use arrays? Wow... That could be helpful!