Click to See Complete Forum and Search --> : Opening exe's
Jonathon Carr
August 27th, 2001, 03:11 PM
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.
DSJ
August 27th, 2001, 04:34 PM
Try:
shell("C:\program.exe", vbMaximizedFocus )
Cakkie
August 28th, 2001, 01:26 AM
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
slisse@planetinternet.be
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
Jonathon Carr
August 28th, 2001, 03:08 PM
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.
DSJ
August 28th, 2001, 03:18 PM
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
bhanuprakash
August 29th, 2001, 09:17 AM
just type in the following code
Shell ("C:\Program.exe"),Vbmaximised
.
this will open the exe in maximised form
Jonathon Carr
August 30th, 2001, 01:36 AM
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.
bhanuprakash
August 30th, 2001, 04:03 AM
u can try with this
Shell "c:\xxx\xxx.exe", vbMaximizedFocus
i am using this and it works
squakMix
September 14th, 2003, 01:11 AM
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.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.