Link to home
Start Free TrialLog in
Avatar of NamCit
NamCit

asked on

To control all screen of monitor


Dear advisor !

i use D.5

i want to write an application to control computer like Cyber Time.

After windown starting, the application must be run and it holds all screen of monitor.
To use all services in computer(internet, music ...) , the user must input username and password correctly.

Please should me how to write this application. Send to me the source if possible

Thanks for all consider

Beginner

PS : i could increase the point if require
Avatar of Cynna
Cynna

Most of your problem is easy. This is the "poor-man version":

var AllowedClosing: Boolean=TRUE; // FALSE to prevent Alt-F4

procedure TForm1.FormCreate(Sender: TObject);
begin
   // "Capture" monitor:
   SetBounds(0,0,Screen.Width,Screen.Height);
   FormStyle:=fsStayOnTop;
   BorderStyle:=bsNone;
end;

procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
  // We must set AllowedClosing to allow termination
  if AllowedClosing then CanClose:=FALSE;
end;

This code will do most of what you want.
But, to really cut-off user, you'll have to disable Ctrl-Alt-Delete for example. Total keyboard control is possible
only through global keyboard hook, which is a whole different issue (a "rols-royce version" :) ...
Avatar of NamCit

ASKER


Oh , it works well.

How could i disable Ctrl-Alt-Delete ?

I will offer more points to Mr. Cynna or anyone help me to solve this problem.

Looking forward to hearing any news

i have once downloaded a programm called
protect. this does exactly what you want
i'm not more able to find the place where
i downloaded it so if you give me an email
i can send it to you

gandalf
NamCit,

I presume you don't want this for NT based system (otherwise, why bother with login sequence, if system provides you this already...). If not, forget it: Ctrl-Alt-Del can't be captured on NT.

For Win9x, add the following in FormCreate to disable Ctrl-Alt-Del:

var tmp: Integer;
//.....
SystemParametersInfo(SPI_SCREENSAVERRUNNING, 1, @tmp, 0);

And, after logon, enable it again by:

SystemParametersInfo( SPI_SCREENSAVERRUNNING, 0, @tmp, 0);

Avatar of NamCit

ASKER


Dear Cynna !

It works well.

Please expalain for me a bit about SystemParametersInfo Procedure.

I find that procedure on D5 Help Doccument, but not found.
Mr Dynna, your answear is easy and shortly.

*----------

Dear gandalf_the_white !

My email : faq111@yahoo.com. I hope to learn ST from your source
ASKER CERTIFIED SOLUTION
Avatar of Cynna
Cynna

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial