Solved

To control all screen of monitor

Posted on 2002-07-23
6
142 Views
Last Modified: 2010-04-04

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
0
Comment
Question by:NamCit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 7

Expert Comment

by:Cynna
ID: 7174703
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" :) ...
0
 

Author Comment

by:NamCit
ID: 7176118

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

0
 
LVL 3

Expert Comment

by:gandalf_the_white
ID: 7176866
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
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Expert Comment

by:Cynna
ID: 7176952
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);

0
 

Author Comment

by:NamCit
ID: 7178980

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
0
 
LVL 7

Accepted Solution

by:
Cynna earned 50 total points
ID: 7179536
This is the quote from Win32 developer's references help:


The SystemParametersInfo function queries or sets systemwide parameters. This function can also update the user profile while setting a parameter.

BOOL SystemParametersInfo(

    UINT uiAction,     // system parameter to query or set
    UINT uiParam,     // depends on action to be taken
    PVOID pvParam,     // depends on action to be taken
    UINT fWinIni      // user profile update flag
   );    


So, we are using it to tell the system that your app is a
screen saver. This disables Ctrl-Alt-Del functionality.
To enable it again (notify that screen server is not
running any more), second parameter is set to 0.
Third parametar is return variable, which is irrelevant
for our purpose. And last parametar tells the system how
your change is to be broadcasted, and if user profile is
to be updated. We don't want that, so we set it to zero.

If you need more info on this (as well as any other API
call), you should search MSDN. For example, detailed help
on SystemParametersInfo is at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/sysinfo_4p67.asp
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

742 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question