home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Opening another program from VB

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1517
Discussions: 200,952, Posts: 2,379,480, Members: 246,318
Old January 9th, 2003, 03:35 PM   Digg it!   #1 (permalink)
Member
 
Join Date: May 2002
Posts: 177
Opening another program from VB

I was wondering how to open another program from VB. Such as the calculator for example. I want to have a button that, when clicked, opens the calculator.

Thanks for the help
J'rd is offline   Reply With Quote
Old January 9th, 2003, 03:58 PM     #2 (permalink)
Thaumaturge Member
 
howste's Avatar
 
Join Date: Oct 2001
Location: West Haven, Utah
Posts: 15,320
I don't know if it's the same in straight VB, but in Access VBA it would be:

Call Shell("CALC.EXE", 1)
howste is offline   Reply With Quote
Old January 9th, 2003, 04:02 PM     #3 (permalink)
ph34r t3h g04t
 
Whir's Avatar
 
Join Date: Oct 2001
Location: Kingsford, MI
Posts: 19,558
Blog Entries: 7
I think it's the same, but I'm not 100%. I've only done it once and that was a ways back at work.

Oh Vaaaaaaaaaaaaaaasss! ;0
Whir is offline   Reply With Quote
Old January 9th, 2003, 07:37 PM     #4 (permalink)
Senior Member
 
Join Date: Oct 2001
Location: Alberta, Canada
Posts: 563
for vb 6, it's just as howste said. first parameter is path and filename of app to run, second is windowstyle, returns a double.

someone else will have to help with vb.net... haven't had a chance to play with it yet...

cheers!
^hyd^ is offline   Reply With Quote
Old January 9th, 2003, 07:47 PM     #5 (permalink)
Not Really a Member
 
Join Date: Oct 2001
Posts: 25,386
in vbscript you can do something like (also works in vb)

Dim oShell
Set oShell = CreateObject ("WSCript.shell")
oShell.run ("calc.exe")

or howste's will work fine
personally I'd use howste's method, I try to limit the above method in normal vb *shrug*
__________________
Helicopters don't fly; they vibrate so much and make so much noise that the earth rejects them.
vass0922 is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (2943)
The disrespect of Obama by Russian .. (41)
Making Health Care Worse (178)
Wireless Televisions. (12)
CPU fan stops spinning randomly (9)
Regular Build (11)
windows 7 problem (7)
Is the PSU I received dead? (12)
radeon x850xt platinum & shader.. (6)
Print spooler problem (15)
HIS HD5770 graphic card question (15)
windows vista security holes (10)
Install XP pro and a Vista laptop ?.. (11)
Foreign voltage (10)
Recent Discussions
SELLING FRESH,CVV,LOGINS,DUMPS,TRACKS.. (0)
CPU fan stops spinning randomly (9)
Common Spyware Solutions (105)
EVGA 9800 gtx help with finding a goo.. (11)
Regular Build (11)
Help with onclick and buttons (0)
Modern Warfare 2: Who Bought It? (63)
Virus advise (8)
My monitor won't turn on after instal.. (1)
Laptop with wireless problem. (3)
Internet Lost (3)
Dept. of HS: NSA 'Helped' Develop Vis.. (16)
windows vista security holes (10)
Point and Shoot Camera Suggestions. (4)
Multiple Restarts Required at Boot (2)
Ideal cheap graph card for PC-Gaming? (18)
radeon x850xt platinum & shader 3 (6)
Graphics Card Upgrade Question (4)
For Sale BFG GTX285 OC2 with 10 year .. (3)
How to convert MP3's (4)
Wireless Televisions. (12)
Hp Artist Edition + Matching Bag (0)
Asus P4G8X Mobo (6)
Xbox 360 GTA: SA disk error (1)
Is the PSU I received dead? (12)


All times are GMT -4. The time now is 04:27 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28