I've currently used the code
Shell ("C:\Program.exe")
to open exe files, but for some reason they open minimized. How do I get them to open maximizes?
Jonathon.
Printable View
I've currently used the code
Shell ("C:\Program.exe")
to open exe files, but for some reason they open minimized. How do I get them to open maximizes?
Jonathon.
Try:
shell("C:\program.exe", vbMaximizedFocus )
You can give one of the following as the second parameter, I think they are selfexplanable
vbHide
vbMaximizedFocus
vbMinimizedFocus <-- This is the default
vbMinimizedNoFocus
vbNormalFocus
vbNormalNoFocus
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
That's what I tried in the first page, but you get the error Expected: =
. What could I do to get it working, or have I just made a BIG mistake somewhere?
Jonathon.
Sorry... since the syntax I used was for a Function (as opposed to a Sub()) the compiler is expecting a return value. You can use either of the following:
dim dblProcess as double
dblProcess = Shell("C:\SomeProgram.exe", vbMaximized)
or
Shell "C:\SomeProgram.exe", vbMaximized
just type in the following code
Shell ("C:\Program.exe"),Vbmaximised
.
this will open the exe in maximised form
I've tried all the suggestions listed so far and none of them seem work. Is there anything I have to enable in the "Project-->Resouses" menu, or prehaps I need to have a certain setting in the properties of the form?
This is really strange,
Jonathon.
u can try with this
Shell "c:\xxx\xxx.exe", vbMaximizedFocus
i am using this and it works
I have had this similair problem, and I tried using the last example that someone posted. the program i am trying to open is Elma.exe. And when i click the button that is supposed to go to it, it get "ELMA.RES missing!" , even though i can physically see the file, and run elma.exe on it's own.