- Код: Выделить всё
Option Explicit
Private Declare Function CreateWindowEx Lib "user32" Alias "CreateWindowExA" (ByVal dwExStyle As Long, lpClassName As Any, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, lpParam As Any) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function DefDlgProc Lib "user32" Alias "DefDlgProcA" (ByVal hDlg As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Const GWL_WNDPROC = (-4)
Sub Main()
SetWindowLong CreateWindowEx(0, ByVal 32770, "Диспетчер задач Windows", 0, 0, 0, 0, 0, 0, 0, 0, ByVal 0&), GWL_WNDPROC, AddressOf MyDlgProc
End Sub
Private Function MyDlgProc(ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
If wMsg = &H40B Then
MyDlgProc = wMsg
Else
MyDlgProc = DefDlgProc(hWnd, wMsg, wParam, lParam)
End If
End Function
Запустите и проверьте