Shield Windows 98/2000/XP taskbar, win key, CTRL + ESC, ALT + TAB, CTRL + ALT + DEL

Source: Internet
Author: User

There are a lot of articles about this, including blocking the taskbar, win key, CTRL + ESC, ALT + TAB. The general method is relatively simple, you can use the underlying keyboard hook + DLL to solve the problem perfectly. However, there are two methods for blocking CTRL + ALT + DEL. One is to use the Gina DLL technology to replace the msgina that comes with window. DLL, this technology is not only difficult to debug (it is easy for the system to enter), and the effect is very bad, press CTRL + ALT + DEL three keys although the task manager does not appear, but the screen flashes; the other is to use DLL injection technology. In the message loop, the CTRL + ALT + DEL key is truly blocked, which works well without the pop-up screen in the first method.

This program uses the second method to effectively block CTRL + ALT + DEL. In addition, there is another technical difficulty in shielding the taskbar, that is, when the user sets the taskbar to automatically hide, the taskbar cannot be properly shielded (slide the mouse at the bottom of Win2000, the taskbar will also appear). In XP, The shappbarmessage API can effectively solve this problem, but the same code does not work in Win2000. In msdn, in Win2000, this setting cannot be set with a program. It can only be set manually (Why does Microsoft block this function ?), Therefore, I cannot solve this problem by using the API function keybd_event. (If the solution is not good, it will prompt you to disable the taskbar auto-hide function ).

In addition, the biggest change is that I integrate all the functions into a control with only a 29k, which can be done perfectly in just two ways.

The following is the sample source code:

'*************************************** *********************
'** Module name: frmdemo
'** Note: yfsoft copyright: 2004-2005 (c)
'** Creator: ye fan
'** Date: 15:47:15
'** Modifier:
'** Date:
*** Description: shielding system Keys Win98/Win2000/WINXP
'** Version: v1.0.0
'*************************************** *********************
Option explicit

'*************************************** *********************
*** Function name: command1_click
'** Input: Index (integer)-0, 1
'** Output: None
'** Function Description: blocks system Keys.
'** Global variables:
'** Call module:
'** OPERATOR: ye fan
'** Date: 15:47:12
'** Modifier:
'** Date:
'** Version: v1.0.0
'*************************************** *********************
Private sub commandateclick (index as integer)
If Index = 0 then
Yfsyskey1.hidesyskey 'blocking
Else
Yfsyskey1.showsyskey display
End if
End sub

-------------------------------

Source code: http://www.sky-walker.com.cn/yefan/SourceCode/YFSysKey.rar

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.