Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
FastKey.bas
Package: KillAutoRun.rar [view]
Upload User: albinfu
Upload Date: 2021-08-24
Package Size: 71k
Code Size: 2k
Category:
Kill Virus
Development Platform:
Visual Basic
- Attribute VB_Name = "FastKey"
- Public Declare Function SetWindowLong Lib "user32" _
- Alias "SetWindowLongA" _
- (ByVal hwnd As Long, _
- ByVal nIndex As Long, _
- ByVal dwNewLong As Long) _
- As Long
- Public Declare Function GetWindowLong Lib "user32" _
- Alias "GetWindowLongA" _
- (ByVal hwnd As Long, _
- ByVal nIndex As Long) _
- As Long
- Public Declare Function CallWindowProc Lib "user32" _
- Alias "CallWindowProcA" _
- (ByVal lpPrevWndFunc As Long, _
- ByVal hwnd As Long, _
- ByVal Msg As Long, _
- ByVal wParam As Long, _
- ByVal lParam As Long) _
- As Long
- '定义常数
- Public Declare Function RegisterHotKey Lib "user32" (ByVal hwnd As Long, ByVal id As Long, ByVal fsModifiers As Long, ByVal vk As Long) As Long
- Public Declare Function UnregisterHotKey Lib "user32" (ByVal hwnd As Long, ByVal id As Long) As Long
- Public Const GWL_WNDPROC = (-4)
- Public Const WM_QUERYENDSESSION = &H11
- Public Const WM_CLOSE = &H10
- Public Const MOD_ALT = &H1
- Public Const MOD_CONTROL = &H2
- Public Const MOD_SHIFT = &H4
- Public Const WM_HOTKEY = &H312
- '全局变量,存放控件标志性数据
- Public preWindProc As Long, Modifiers As Long
- Public m_AllowExit As Boolean
- Public uVirtkey As Long, idHotkey As Long
- Private Type taLong
- ll As Long
- End Type
- Private Type tzInt
- lWord As Integer
- hWord As Integer
- End Type
- Public Function WndProc(ByVal hwnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
- If Msg = WM_HOTKEY Then
- If wParam = idHotkey Then
- Dim lp As taLong, iz As tzInt
- lp.ll = lParam
- LSet iz = lp
- If (iz.lWord = Modifiers) And (iz.hWord = uVirtkey) Then
- Form1.Visible = True
- End If
- End If
- End If
- WndProc = CallWindowProc(preWindProc, hwnd, Msg, wParam, lParam)
- End Function