Announcement

Collapse
No announcement yet.

Using VB.net to open other programs

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using VB.net to open other programs

    I am throwing together a custom interface to run all my stuff, and i have having the hardest time trying to figure out what code will allow me to "when i hit button x, program x runs"

    I am trying to have it so when i click on MP3, winamp starts up. Ive been messing with VB for about an hour now, searching msdn, and google, and i just cant seem to find a peice of code that works to do, what i imagine, is a very simple operation.

    anyone have an idea on how to do this? i am stuck : )
    Progress here: http://www.siriuscybernetics.net

  • #2
    Piece of cake!
    You're looking for the Tools.Shell command. Here's the page I found: http://msdn.microsoft.com/library/de...ellcommand.asp

    Oh, nice. vBulletin truncated the visual for the link to ...hellcommand. Don't worry - it is a legitimate link!
    http://www.jeepmp3.com/
    CarPC Stolen. Starting over.
    Ne1 recognize the avatar?

    Comment


    • #3
      awesome, thats just what i was looking for, however, using the tools.shell syntax didnt work, it underlined tools saying it wasnt defined or something like that. I found an alias page here http://msdn.microsoft.com/library/de...inealiases.asp
      and it gave me the alias for it which is just shell, and then the code that follows from the text.shell page.

      Hope that helps anyone else having the same problem.
      Progress here: http://www.siriuscybernetics.net

      Comment


      • #4
        Try this:

        Dim X As Long

        X=Shell ("C:\WINDOWS\Mplayer.exe", 1)



        Should fire up Media Player. Now replace the section in quotes with the path to your WinAmp EXE. If you want to add command line arguments, it is best to use short filenames.
        Player: Pentium 166MMX, Amptron 598LMR MB w/onboard Sound, Video, LAN, 10.2 Gig Fujitsu Laptop HD, Arise 865 DC-DC Converter, Lexan Case, Custom Software w/Voice Interface, MS Access Based Playlists
        Car: 1986 Mazda RX-7 Turbo (highly modded), 1978 RX-7 Beater (Dead, parting out), 2001 Honda Insight
        "If one more body-kitted, cut-spring-lowered, farty-exhausted Civic revs on me at an intersection, I swear I'm going to get out of my car and cram their ridiculous double-decker aluminium wing firmly up their rump."

        Comment


        • #5
          well,
          Shell """c:\Program Files\SomeFile.exe""" works fine for me. For some reason the msdb website says you need 3 sets of quotes, but it works fine.

          The problem i had was when you put tools.shell "whatever"... it gives me the msg "Name "Tools" not declared"

          but since i got it to work with just shell "whatever" i think im good

          thanks for your help
          Progress here: http://www.siriuscybernetics.net

          Comment

          Working...
          X