How can i open another program from vb ?
Printable View
How can i open another program from vb ?
VB Code:
Shell "c:\myprogram.exe"
If you want the program to run in normal mode (not minimized) then you need to specify 1 for the last argument.
Code:Shell "c:\myprogram.exe", 1
Of all people I didn't expect you to use a hard-coded constant. :pQuote:
Originally posted by Megatron
If you want the program to run in normal mode (not minimized) then you need to specify 1 for the last argument.
Code:Shell "c:\myprogram.exe", 1
Shell "c:\myprogram.exe", vbNormalFocus
Whilst were pontificating, lets' list them all
vbHide
vbMaximizedFocus
vbMinimizedFocus
vbMinimizedNoFocus
vbNormalFocus
vbNormalNoFocus
When the number is small (e.g: 1, -1, 3 etc.) I'll use it, otherwise, I'd rather use a constant than &H4AA4.Quote:
Originally posted by filburt1
Of all people I didn't expect you to use a hard-coded constant. :p
Shell "c:\myprogram.exe", vbNormalFocus