Solved

Hiding Taskbar and Ctrl Key

Posted on 2004-10-14
7
278 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:gopinair
Comment Utility
how to lock the keyboard and hide desktop.
0
 
LVL 32

Expert Comment

by:Erick37
Comment Utility
Was your original question answered?
0
 

Author Comment

by:gopinair
Comment Utility
No.. I donot want to dicturb the registry.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…

743 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

16 Experts available now in Live!

Get 1:1 Help Now