To close Winamp:
Code:Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As Any, ByVal lpWindowName As Any) As Long Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Const WM_CLOSE = &H10 Private Sub Command1_Click() 'Get the handle of Winamp Retval = FindWindow(0&, "Winamp 2.5e") 'Close Winamp SendMessage Retval, WM_CLOSE, 0&, 0& End Sub




Reply With Quote