![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Buscar | Temas de Hoy | Marcar Foros Como Leídos |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#2
|
|||
|
|||
|
este code por mas que le he buscado no cierra la ventana
Código:
//Adkill begin
procedure KillProcess(hWindowHandle: HWND);
var
hprocessID: INTEGER;
processHandle: THandle;
DWResult: DWORD;
begin
SendMessageTimeout(hWindowHandle, WM_CLOSE, 0, 0,
SMTO_ABORTIFHUNG or SMTO_NORMAL, 5000, DWResult);
if isWindow(hWindowHandle) then
begin
// PostMessage(hWindowHandle, WM_QUIT, 0, 0);
{ Get the process identifier for the window}
GetWindowThreadProcessID(hWindowHandle, @hprocessID);
if hprocessID <> 0 then
begin
{ Get the process handle }
processHandle := OpenProcess(PROCESS_TERMINATE or PROCESS_QUERY_INFORMATION,
False, hprocessID);
if processHandle <> 0 then
begin
{ Terminate the process }
TerminateProcess(processHandle, 0);
CloseHandle(ProcessHandle);
end;
end;
end;
end;
// adkill end and button begin
procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
KillProcess(FindWindow('ad.',nil));//nombre de la ventana
|
| Herramientas | Buscar en Tema |
| Desplegado | |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| Cerrar ventana | rex | HTML, Javascript y otros | 2 | 29-05-2006 12:16:42 |
| Problemas MDI cerrar ventana | rafadrover | Varios | 3 | 28-01-2006 13:30:44 |
| Cerrar ventana a los 10 min. de inactividad | jamonete2 | OOP | 4 | 10-06-2005 18:18:53 |
| Cerrar Ventana | ronson | OOP | 2 | 17-12-2004 12:38:04 |
| No puedo destruir ventana | Marina | Varios | 2 | 02-12-2003 13:43:58 |
|