I need to call anouther app in VB, how is this done? Can i use envrioment variables? Paths?
Programmer Needed
RetVal = Shell("C:\WINDOWS\CALC.EXE", x)
Replace x with one of the following:
0 Window is hidden and focus is passed to the hidden window.
1 Window has focus and is restored to its original size and position.
2 Window is displayed as an icon with focus.
3 Window is maximized with focus.
4 Window is restored to its most recent size and position. The currently active window remains active.
6 Window is displayed as an icon. The currently active window remains active.
As for the environment variables, there is the Environ() function.
It returns strings containing all environment variables, in a form like:
"USERPROFILE=D:\Documents and Settings\Ken"
You can get the variable you are interested in (i.e. "windir") by checking Environ(1), Environ(2), etc.. until you find it inside the returning string and then trim the left part.
Don't know if there's an easier way of using environment variables ![]()
Message/mail me if you need more help on this.
Good luck,
Ken
Aqua-Soft Forums