Board index » delphi » Disabling Alt-TAB and all other forms of task switching

Disabling Alt-TAB and all other forms of task switching

How do I disable Alt-Tab and other methods of task switching from windows
3.1 and windows 95.

I have a product that must sit on top of every other product until a
password is type in and the must pop back up over all other tasks when a
time limit has run out.

Regards
   Glen

 

Re:Disabling Alt-TAB and all other forms of task switching


Quote
>How do I disable Alt-Tab and other methods of task switching from windows
>3.1 and windows 95.

There is a note about this in the MS Developer Network CDs.  Worth
getting and reading.

However, you're not running DOS, and really don't have the right to
stop a user swapping tasks.

Quote
>I have a product that must sit on top of every other product until a
>password is type in and the must pop back up over all other tasks when a
>time limit has run out.

Use a stay-on-top form.

Wade

Re:Disabling Alt-TAB and all other forms of task switching


Quote
w...@iprolink.co.nz (Wade Auchterlonie) wrote:
>>How do I disable Alt-Tab and other methods of task switching from windows
>>3.1 and windows 95.
>There is a note about this in the MS Developer Network CDs.  Worth
>getting and reading.
>However, you're not running DOS, and really don't have the right to
>stop a user swapping tasks.
>>I have a product that must sit on top of every other product until a
>>password is type in and the must pop back up over all other tasks when a
>>time limit has run out.
>Use a stay-on-top form.

One method i read was to put a popup menu on the form, and set the
short cut property to alt+tab and ctrl+Esc.

be aware that other forms with stay-on-top set, or that bring
themselves to the top on idle, may pop up over your form.

Another option for preventing a user from using other products is to
index thur all the visible windows and use ShowWindow( handle, SW_HIDE
)  to hide them.  Then of course, the user can't get to them.  Just be
sure to keep a list of what you set hidden, and then show it again (
SW_SHOW ).

incidentaly, i would tend to agree with the above note that it is
annoying for a product to do this( unless of course it is its function
to prevent you from using the other products until you enter a
password ).

David

Re:Disabling Alt-TAB and all other forms of task switching


In article <4ppu7s$...@status.gen.nz>, library <napl...@central.co.nz>
writes

Quote
>How do I disable Alt-Tab and other methods of task switching from windows
>3.1 and windows 95.

>I have a product that must sit on top of every other product until a
>password is type in and the must pop back up over all other tasks when a
>time limit has run out.

A good way to do this is to use an API to make the password form the
only form which can be pressed:

procedure TPasswordFrm.OnCreate;
begin
  SetSysModalWindow (Handle);
end;

Simply show the form using Showmodal then.

HTH

Nicholas.
--
Nicholas Robinson

Turnpike evaluation. For information, see http://www.turnpike.com/

Re:Disabling Alt-TAB and all other forms of task switching


In article <4ppv1v$...@news.nznet.gen.nz>, Wade Auchterlonie
<w...@iprolink.co.nz> writes

Quote
>>I have a product that must sit on top of every other product until a
>>password is type in and the must pop back up over all other tasks when a
>>time limit has run out.

>Use a stay-on-top form.

>Wade

If I could just comment - Stay-On-Top will but will not work.  If the
form is just on the top the user will still be allowed to alt_tab
--
Nicholas Robinson

Turnpike evaluation. For Turnpike information, mailto:i...@turnpike.com

Re:Disabling Alt-TAB and all other forms of task switching


On Thu, 13 Jun 1996 19:50:56 GMT, w...@iprolink.co.nz (Wade

Quote
Auchterlonie) wrote:
>There is a note about this in the MS Developer Network CDs.  Worth
>getting and reading.

I will take a peek.  Thanks.

Quote
>However, you're not running DOS, and really don't have the right to
>stop a user swapping tasks.

As for not having the right to stop a user from swapping tasks of
course I do.  How else is my client meant to control public access
internet pcs in their library?

Quote
>Use a stay-on-top form.

While its a good idea the NormalizeTopmosts and RestoreTopmosts do not
work as they should i.e. the forms never stay on top once they have
been normalized.

Regards
   Glen

Re:Disabling Alt-TAB and all other forms of task switching


On Thu, 13 Jun 1996 19:50:56 GMT, w...@iprolink.co.nz (Wade

Quote
Auchterlonie) wrote:
>>How do I disable Alt-Tab and other methods of task switching from windows
>>3.1 and windows 95.

>There is a note about this in the MS Developer Network CDs.  Worth
>getting and reading.

>However, you're not running DOS, and really don't have the right to
>stop a user swapping tasks.

But you can do...

Check out CBT hooks in the WinAPI help.

The only problem: Will not work with 16bit on Win95!

So you can easily task switch in Win95, no matter what you do in your
16bit exe.
In Win3.1: no task switching: Alt-esc, alt-tab etc...

--
Stefan Hoffmeister                       Stefan.Hoffmeis...@Uni-Passau.de
University of Passau, Bavaria, Germany   http://www.rz.uni-passau.de/~w4hoff01/

Re:Disabling Alt-TAB and all other forms of task switching


Quote
Nicholas Robinson <NRo...@demon.com> wrote:
>A good way to do this is to use an API to make the password form the
>only form which can be pressed:
>procedure TPasswordFrm.OnCreate;
>begin
>  SetSysModalWindow (Handle);
>end;

That is a nice try - and i believe it would work under 16bit Windows.
Unfortunalely I am working on 32bit-Level and looking in the Win32
Documentation I found:

        >The SetSysModalWindow function is not implemented in the Win32 API

That is ok for a 'normally'  used computer, but I have to lock away
some functions - including System-Access!
The computer will be used for a very specific task without the
possiblity to play around...
There may be ways using the User Security of Win95 / WinNT, but I
think it is to complicated (and takes too long) to logoff/logon when
the user of my software changes.

--
...and Greetings to everybody from Udo.Burgha...@T-Online.de,        

Other Threads