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.
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.
解决方案 »
- DevExpress中cxGrid能否在单张表中实现树状结构?
- !!!!!!!!!!!!!!!急 急 急 开开机后 桌面乌黑 则么回事
- 想找一个c/s结构的进销存系统原代码,哪位有啊,帮帮我吧
- 数据库问题?在线给分,不够再加!!
- rpc服务不可用
- 紧急求助!程序注销功能怎么实现?
- 我要调用SHBrowseForFolder来弹出特殊的文件夹窗体;
- 请问在delphi中怎么打开一个access数据库。
- zswang(伴水)(需要充充电):过路请进. 一个你成功后的问题.
- 可怜的系统资源啊!50%?!大虾快救救我!SOS!
- FastReport 动态打印多幅图片
- 使用delphi7开发看《Delphi 5 开发人员指南》???
论坛签名======================================================================
http://blog.csdn.net/akof1314