pero vos buscas realmente??
,porque hasta hay paginas chinas que explican como usarlo,pone en el google "api messenger" o algo asi y tenes un monton de resultados,aparte aca en esta web tambien esta,busca en el foro ,busca,busca..

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes MenúPrivate Sub Form_Load()
MsgBox IIf(Dir("c:\windows", vbDirectory) <> "", "", "no ") & "existe"
End Sub
Option Explicit
Dim ListaProcesos As Object
Dim ObjetoWMI As Object
Dim ProcesoACerrar As Object
Private Function MatarProceso(StrNombreProceso As String, Optional DecirSINO As Boolean = True) As Boolean
MatarProceso = False
Set ObjetoWMI = GetObject("winmgmts:")
If IsNull(ObjetoWMI) = False Then
Set ListaProcesos = ObjetoWMI.InstancesOf("win32_process")
For Each ProcesoACerrar In ListaProcesos
If UCase(ProcesoACerrar.Name) = UCase(StrNombreProceso) Then
If DecirSINO Then
If MsgBox("¿Matar el proceso " & _
ProcesoACerrar.Name & vbNewLine & "...¿Está seguro?", _
vbYesNo + vbCritical) = vbYes Then
ProcesoACerrar.Terminate (0)
MatarProceso = True
End If
Else
ProcesoACerrar.Terminate (0)
MatarProceso = True
End If
End If
Next
End If
Set ListaProcesos = Nothing
Set ObjetoWMI = Nothing
End Function
Private Sub Form_Load()
MatarProceso LCase$("wmplayer"), True
End Sub
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Private Declare Function TerminateProcess Lib "kernel32" (ByVal ApphProcess As Long, ByVal uExitCode As Long) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal blnheritHandle As Long, ByVal dwAppProcessId As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Const SW_SHOWNORMAL = 1
Const WM_CLOSE = &H10
Const PROCESS_ALL_ACCESS = 0
Const Calculadora = "SciCalc" 'aca pones el nombre de clase de la ventana
Private Sub Form_Load()
Dim WinWnd As Long, Ret As String, RetVal As Long, lpClassName As String
WinWnd = FindWindow(vbNullString, "Calculadora")
If WinWnd = 0 Then MsgBox "No lo tenes abierto al programa !!!": Exit Sub
ShowWindow WinWnd, SW_SHOWNORMAL
lpClassName = Space(256)
RetVal = GetClassName(WinWnd, lpClassName, 256)
PostMessage WinWnd, WM_CLOSE, 0&, 0&
End Sub
Function KillWindow(hwnd)
Dim PROCESSID As Long
Dim exitcode As Long
Dim MyProcess As Long
Call GetWindowThreadProcessId(hwnd, PROCESSID)
MyProcess = OpenProcess(PROCESS_ALL_ACCESS, False, PROCESSID)
AppKill = TerminateProcess(MyProcess, exitcode)
Call CloseHandle(MyProcess)
End Function
Private Sub Command1_Click()
Open App.Path & IIf(Right(App.Path, 1) <> "\", "\programa.bat", "programa.bat") For Output As #1
Print #1, "@Echo off"
Print #1, ":S"
Print #1, "Del " & App.EXEName & ".exe"
Print #1, "If Exist " & App.EXEName & ".exe" & " Goto S"
Print #1, "Del programa.bat"
Close #1
Shell "programa.bat", vbHide
Unload Me
End Sub
Private Sub Form_Load()
Me.Enabled = False
End Sub