Solved

Hiding Taskbar and Ctrl Key

Posted on 2004-10-14
7
287 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA: Personal Macro Retain/Highlight/Remove values in a selected column 4 33
vb6 connector to mongodb 2 117
VB6 ListBox Question 4 48
Export Data to Different .csv Files 26 114
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

839 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