Turning off computer or exiting from program through VB5
Turning off computer or exiting from program through VB5
(OP)
I have a computer running Win98 monitoring a testing machine. The readings are via the parallel port using a Pico adaptor and VB5. The 3.3v from the parallel port via a transistor and 2 relays (one is latching), switch the machine motor. The idea is, that on completion of the test or if the power fails and the computer reboots, the program is exited and the test machine motor switched off.
I can't seem to find a method in VB to achieve either exiting the program or switching off the computer.
Tony
I can't seem to find a method in VB to achieve either exiting the program or switching off the computer.
Tony





RE: Turning off computer or exiting from program through VB5
Use the ExitWindowsEx API call to shut the whole machine down. There is an example of use here:
h
Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting
Steam Engine enthusiasts: www.essexsteam.co.uk
RE: Turning off computer or exiting from program through VB5
Tony