PDA

View Full Version : Close internet conection and power off monitor??


Solmos
03-21-2007, 08:01 AM
Hi

i like to know how scrip to me to be able to disconnect the connection to Internet

also as it is possible to be made to power off the monitor

thanks

Brett
03-21-2007, 09:29 AM
Try this:


strMessage = "Please unplug your network cable, turn off your monitor, and click OK to continue.";
Dialog.Message("Instructions",strMessage);


;) just kidding.

There is no way to do those things that are built into AMS. However, if you find a DLL or executable that does them you can call them from AMS.

nals
03-21-2007, 05:51 PM
1. Download NirCmd is a small command-line utility
http://www.nirsoft.net/utils/nircmd.html

2. install this in windows dir (just one file)
OR (use it with your project to copy the file to windows folder)

File.Copy("AutoPlay\\Docs\\nircmd.exe", "C:\\windows\\", true, true, false, true, nil);

3. create batch file for each command eg..
@echo off
nircmd.exe monitor off

4. use the batch file to each button click
result = File.Run("AutoPlay\\Docs\\Monitor_Off.bat", "", "", -1 , true);

Maybe there is other easier way but I only know this way, sorry if i m wrong.

If there is any other way I m interested to know too.
:rolleyes

nicoh
05-04-2007, 06:12 PM
Thanks you, nals, the instructive was very usefull for me.. thanks!!


-*-

Sorry for my bad english.. im learning :P!

bye

RizlaUK
05-04-2007, 06:39 PM
here is a dll to turn off/standby the monitor, you can also invoke the users default screen saver :yes

wasim21k
05-05-2007, 05:49 AM
RiszlaUK brilliant idea. thanx

4090987414711
05-05-2007, 06:49 AM
Last night I made an example of NirCmd, it might be useful for some people!

Link Here! (http://www.indigorose.com/forums/showthread.php?t=19809)