I have a problem for some reason with Vbhide on one XP computer. I have some
code running on 30 XP machines and it runs fine, but one XP machine doesn’t
want to hide the window when executed.
The below code is an example of the line of code that opens the window and
does a task. (Dir is just an example)
Shell("command.com /c dir", vbhide)
On the 30 computers it works on, this code executes behind the scenes and you
don't see anything. On the one XP you see the command prompt window open, the
task runs then closes when finished.
Any ideas what could be causing Vbhide not to work on that one computer?
System setting, registry values, anything...
Thanks
G8oR
Bob Butler - 26 Jan 2008 13:59 GMT
>I have a problem for some reason with Vbhide on one XP computer. I have
>some
[quoted text clipped - 14 lines]
> Any ideas what could be causing Vbhide not to work on that one computer?
> System setting, registry values, anything...
Check for a command.pif file which may have some settings; also, if you open
a command window and click the system icon in the upper left the menu will
have "defaults" and "properties" options which can be used to configure the
size and layout of the window. Doing that creates registry entries although
I don't remember the exact path offhand.
Keep in mind that the window style argument passed to the Shell function is
a request only; the app you start is always free to ignore it and make the
window hidden or visible and set the windowstate as it wants to. If the
user has configured their system to show DOS windows a certain way then you
shouldn't be changing that. It would be better to replace whatever you are
using the DOS commands to do with something under your control.