Solved

To control all screen of monitor

Posted on 2002-07-23
6
143 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

726 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