unit Unit1;interfaceuses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, shellAPI, StrUtils, StdCtrls;
const
      TempHumid=WM_USER+61021;
type
  TForm1 = class(TForm)
    Label3: TLabel;
    Label4: TLabel;
    Label1: TLabel;
    Label2: TLabel;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
    procedure   HandleMessage(var msg: TagMsg;var handled: Boolean); //message   TempHumid;
  public
    { Public declarations }
  end;var
  Form1: TForm1;
//    TempHumid:UINT;
implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
begin
  Application.OnMessage := HandleMessage;
  // shellexecute(application.Handle,nil,'.\HumidServer.exe',nil,nil,sw_shownormal)
end;procedure TForm1.HandleMessage(var msg: TagMsg;var handled: Boolean);
var
  temp: double;
begin
  if Msg.message = TempHumid then
  begin
    label1.Caption:= inttostr(Msg.wParam);
    temp:= Msg.lParam/10;
    label2.Caption:= floattostr(temp);
  end;
end;end.