1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, CheckLst;
const wm_jamai=wm_user+1;
type
TForm1 = class(TForm)
private
{ Déclarations privées }
Procedure MonMessage(var msg:TMessage);message wm_Jamai;
public
{ Déclarations publiques }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.MonMessage;
begin
showmessage('pas');
end;
procedure TForm1.Button1Click(Sender: TObject);
var j:Integer;
begin
for j:=1 to application.ComponentCount-1 do //commence par 1; le 0 pour l'application elle meme) :(
SendMessage(TForm(application.Components[j]).Handle,WM_Jamai,0,0);
end;
end. |
Partager