Solved

To control all screen of monitor

Posted on 2002-07-23
6
131 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
  • 3
  • 2
6 Comments
 
LVL 7

Expert Comment

by:Cynna
Comment Utility
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
Comment Utility

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
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 7

Expert Comment

by:Cynna
Comment Utility
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
Comment Utility

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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

771 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now