Solved

Hiding Taskbar and Ctrl Key

Posted on 2004-10-14
7
281 Views
Last Modified: 2010-05-02
I have written an application. Whenever it get executed i want to hide taskbar and ctrl key. Ultimate goal is no one should be in a position to open the taskmanager.
0
Comment
Question by:gopinair
  • 2
  • 2
  • 2
7 Comments
 
LVL 9

Assisted Solution

by:Shahid Thaika
Shahid Thaika earned 100 total points
ID: 12310473
Don't know how to hide the CTRL key of the keyboard :P :), but this hides the taskbar.

---------------------------------------------------------------------------------------------------------
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Private Const SW_SHOW = 5
Private Const SW_HIDE = 0

Private Sub Form_Load()
Dim lhWnd As Long

'Get the handle of the taskbar
lhWnd = FindWindow("Shell_TrayWnd", vbNullString)

'Hide the task bar
ShowWindow lhWnd, SW_HIDE

'Pause for 5 seconds
Sleep 5000

'show the task bar
ShowWindow lhWnd, SW_SHOW
End Sub
---------------------------------------------------------------------------------------------------------
0
 
LVL 32

Accepted Solution

by:
Erick37 earned 100 total points
ID: 12310532
To disable the Task Manager, create the following key in the registry:

HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr = dword:1

0
 
LVL 9

Expert Comment

by:Shahid Thaika
ID: 12310837
Incase you don't want to mess with the clients registry, you can use FindWindow API to keep a look out for the Task Manager window and close it by sending a message, if it is open. You may also want to look at the following sites...
http://www.codeguru.com/vb/gen/vb_system/article.php/c1661/
http://www.meliorasoft.com/kits/keyboard/
http://is-it-true.org/nt/xp/registry/rtips23.shtml
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:gopinair
ID: 12332038
how to lock the keyboard and hide desktop.
0
 
LVL 32

Expert Comment

by:Erick37
ID: 12332096
Was your original question answered?
0
 

Author Comment

by:gopinair
ID: 12333602
No.. I donot want to dicturb the registry.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Window placement 17 77
using Access 8 59
VB 6 error 5 in windows 10 but not in XP 7 46
Need Nag Screen for Reboot if system up time is over 14 days 12 19
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

862 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

24 Experts available now in Live!

Get 1:1 Help Now