QuestionI got a code that displays active application names inside a listbox. Is it possible to close the selected application name inside the listbox? Thx..Here are the codes..
Function EnumWindowsProc (Wnd: HWND; lb: TListbox): BOOL; stdcall;
caption: Array [0..128] of Char;
Result := True;
if IsWindowVisible(Wnd) and ((GetWindowLong(Wnd, GWL_HWNDPARENT) = 0) or
(HWND(GetWindowLong(Wnd, GWL_HWNDPARENT)) = GetDesktopWindow)) and
((GetWindowLong(Wnd, GWL_EXSTYLE) and WS_EX_TOOLWINDOW) = 0) then
Have a look at message 12710 Stop another program from Delphi app that explains how to stop another program, if you know its title (text from the title bar, as you have in the listbox).