The MP3car.com Store The MP3car.com Store    

Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development

Reply
 
LinkBack Thread Tools Display Modes
Old 11-22-2002, 11:08 PM   #1
Registered User
 
Join Date: Sep 2002
Location: Worcester, MA
Posts: 252
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 : )
naevity is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 11-23-2002, 01:20 AM   #2
FLAC
 
PatO's Avatar
 
Join Date: Dec 2000
Location: Afton MN
Posts: 1,119
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://jeepmp3.home.comcast.net
CarPC Stolen. Starting over.
Ne1 recognize the avatar?

Last edited by PatO; 11-23-2002 at 01:23 AM.
PatO is offline   Reply With Quote
Old 11-23-2002, 09:10 AM   #3
Registered User
 
Join Date: Sep 2002
Location: Worcester, MA
Posts: 252
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.
naevity is offline   Reply With Quote
Old 11-23-2002, 09:32 AM   #4
Retired Admin
 
Aaron Cake's Avatar
 
Join Date: Jan 2000
Location: London, Ontario, Canada
Posts: 2,465
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."
Aaron Cake is offline   Reply With Quote
Old 11-23-2002, 09:37 AM   #5
Registered User
 
Join Date: Sep 2002
Location: Worcester, MA
Posts: 252
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
naevity is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off


All times are GMT -5. The time now is 05:00 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics