> From: email@example.com
> To: VEE Reflector
> Subject: Multiple VEE's and won't Maximize
> Platform: Windows NT 4.0 on Vectra Pentium PC with VEE 4.0
> I've got two questions that are more annoyances rather than
> severe problems.
> First, I know NT and VEE both allow you to run multiple copies of
> the same VEE program at one time, so how does one defeat this added
> blessing? My program that production test runs, controls a good
> amount of expensive test equipment. The program expects the
> equipment states to be exactly where it put them without any
> extra time wasted re-checking. Running two or more programs at
> the same time, could prove disastrous.
> I guess one quick and dirty way would be to set an environment
> variable that SET's VEE=ON, or something like that and check for
> it when you run. But if a program is abnormally terminated it
> would not clear this and another copy would then refuse to go.
> Same with a temporary file used as a flag.
> Any other ideas? Can NT (or 95) itself be queried to find out
> if another VEE program is already running?
> And on a less important (but more irritating) subject, you offer
> start-up switches that can control the size and position of the
> window when it runs. I can find nothing to force VEE to MAXIMIZE
> its window. Is this difficult to implement or something?
> Also, RunTime has NO window position/size switches available at
> all, and worse yet, if I set Run Maximized in a shortcut properties
> box, VEE always overrides that and does what it wants anyway.
> Any plans for future enhancements along these lines?
We had the same problem with test programs for flight hardware. This
solution worked but there may be better ways. Here goes.
1. Make sure the NT/DOS command utility Tlist.exe is on your system.
It will be found under winntsystem32. If it is not, you can get it
from a WIN NT 3.51 resource manager CD.
2. Create a .BAT file (call it tasklist.bat), it should contain the
tlist /b %1 > tasklist.txt
3. You can now execute tasklist.bat from VEE using the Execute Program
4. Next, you can use a VEE Get File function to read the contents of
tasklist.txt. At this point if you have more than one VEE process
running it will appear in the list.
5. I captured all the vee.exe processes and parsed out their name field
and displayed a message to the operator strongly suggesting that under
no circumstances he/she should run a test and that Software Engineering
should be notified.
This approach worked for us, of course it's up to you how you handle