Вниз
Скачать: CL | DM;

Закрытие программы   Найти похожие ветки 

← →
Metotrone ©   (2002-09-21 16:34) [0]

Как програмно закрыть N-ную программу, а не ее активное окно ?


← →
ZZ ©   (2002-09-21 16:41) [1]

terminateprocess


← →
EqapMumo ©   (2002-09-21 17:10) [2]

procedure TForm1.Terminateprocess1Click(Sender: TObject);
var pe32: PROCESSENTRY32;
te32: THREADENTRY32;
num: integer;
procID,thrdID,www: dword;
hd: hwnd;
find,findthread: boolean;
procname: Ansistring;
begin
Timer1.Enabled:=false;
find:=false; findthread:=false;
hd:=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
Process32First(hd,pe32); num:=0;
while (Process32Next(hd,pe32)) and (find=false) do begin
procname:=pe32.szExeFile;
if procname=selecteditem.Caption then begin
procID:=pe32.th32ProcessID; //Thread32First(hd,te32);
find:=true; end; num:=num+1; end;
if find then StopProcess(procID,thrdID);
Timer1.Enabled:=true;
end;



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.013 c
7-8202
Nalsur
2002-07-23 14:33
2002.10.03
TSystemInfo


3-7781
qwerty0
2002-09-14 21:19
2002.10.03
Лицензии к Interbase


1-8020
Lego
2002-09-18 00:08
2002.10.03
Как открыть файл в шестнадцатиричном виде?


3-7879
Engel
2002-09-12 18:40
2002.10.03
Работа DBASE IV в сети.


3-7803
REA
2002-09-09 10:06
2002.10.03
Добавление записей в пронумерованную таблицу




   Наверх