Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Varios (https://www.clubdelphi.com/foros/forumdisplay.php?f=11)
-   -   Checkbox igual al timer (https://www.clubdelphi.com/foros/showthread.php?t=92638)

Milworm99 15-12-2017 22:24:44

Checkbox igual al timer
 
Hola Gente de la comunidad Club Delphi, mi pregunta es si existirá un método para que el codigo del checkbox siga ejecutándose el en tiempo real, igual como un timer.

Los codigos del checkbox que quiero que se ejecute en tiempo real es este:

Código Delphi [-]
procedure TForm1.CheckBox1Click(Sender: TObject);
var
  ValorON,ValorOFF, Buffer: Cardinal;
begin
  ValorON:= 418117253;
  ValorOFF:= 410318469;
if MIOBJ > 0  Then
  begin
  HandleX := OpenProcess(PROCESS_ALL_ACCESS, False, dwPID);
  if CheckBox1.Checked then
  begin
  WriteProcessMemory(HandleX,Pointer(MIOBJ+$5A64E), @ValorON,4, Buffer);
  end
  else
  begin
  WriteProcessMemory(HandleX,Pointer(MIOBJ+$5A64E), @ValorOFF,4, Buffer);
  end
  end;
end;

Código Delphi [-]
procedure TForm1.CheckBox2Click(Sender: TObject);
var
  ValorON,ValorOFF, Buffer: Cardinal;
begin
  ValorON:= 28312949;
  ValorOFF:= 28312948;
if MIOBJ > 0  Then
  begin
  HandleX := OpenProcess(PROCESS_ALL_ACCESS, False, dwPID);
  if CheckBox2.Checked then
  begin
  WriteProcessMemory(HandleX,Pointer(MIOBJ+$5904D), @ValorON,4, Buffer);
  end
  else
  begin
  WriteProcessMemory(HandleX,Pointer(MIOBJ+$5904D), @ValorOFF,4, Buffer);
  end
  end;
end;

Espero su ayuda, si existe algún método. Muchas Gracias !!

Casimiro Notevi 15-12-2017 22:37:16

¿Qué quieres decir con que siga ejecutándose en tiempo real?

Milworm99 15-12-2017 23:14:21

Cita:

Empezado por Casimiro Notevi (Mensaje 523502)
¿Qué quieres decir con que siga ejecutándose en tiempo real?

Osea como si fuera un timer, que siga leyendo el codigo.

O como lo pondria en un timer ?, sin errores ?

farute 16-12-2017 15:54:14

Y qué te impide usar un timer para ello?
si total no usas el sender para nada.

Pues mete el código tal cual en el timer


La franja horaria es GMT +2. Ahora son las 09:57:44.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi